none
What is the difference between vstoDataStore and customXml in document level solutions (using Excel) RRS feed

  • Question

  • Hello -

    I notice that when I build my Excel custom solution the cached data items (marked with the Cached attribute) are initially stored in the vstoDataStore portion of the workbook file.  After opening the workbook the data is sometimes moved to the customXml portion.  Is there a significance to this change?

    Thanks

    Thursday, July 14, 2011 4:08 PM

Answers

  • Hi "T"

    OK, I've looked into this a little, from the Word side (as I have a sample file for that and not for Excel) and chatted a bit with some colleagues. Apparently it goes something like this:

    The VSTO datacache, since the introduction of the Open XML file formats, is stored in a set of CustomXMLParts (item#.xml, item#.xlm.rels, item#props.xml). The Office application stores all the custom xml parts by default in a "folder" named customXml.

    When VSTO builds a document-level solution it creates the data cache using Open XML. Apparently, it names the folder vstoDataStore. At the point where Word reprocesses the file, it integrates "custom" items into its standard schema, according to the namespace URIs. So all custom xml parts end up in the location defined by the schema, which is named customXML.

    This is all valid and allowed by the Office Open XML spec, so no, it's not a problem :-)


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by TCooperCogdill Wednesday, July 20, 2011 11:16 PM
    Monday, July 18, 2011 10:04 AM
    Moderator

All replies

  • Which version(s) of VSTO and Office have you been working with over the life of this project (also referring to your other message)?

    I'm not turning up the reference at the moment, but I seem to recall that, with the move to the Office Open XML file formats (xlsx) in Office 2007, VSTO moved some of its caching and other things to CustomXMLParts in the document. So my guess would be that your workbooks may have started out in 2003 and have since migrated forward? Anyway, here's at least a part of the discussion.

    Or are you talking about docProps\custom.xml ?

    It would probably help if you provided a bit more information about the versions and the kind of things that are being "moved around".


    Cindy Meister, VSTO/Word MVP
    Thursday, July 14, 2011 4:52 PM
    Moderator
  • Hi Cindy

    I'm buiding VSTO 2010 solutions using Visual Studio 2010 and Office 2010. 

    When I first build my solution, the XLSX workbook in the Release folder has a "vstoDataStore" folder (when unzipped).  This folder has the xml files with all of my cached data items.  Upon opening the file in Excel 2010 and saving it, the "vstoDataStore" folder is gone and that data items are now in a new "customXml" folder.

    After playing some more this appears to happen even with a new blank Excel 2010 workbook solution that I build in VSTO so I'm sure it doesn't indicate any kind of problem.

    Still a little curious about what VSTO is doing behind the scenes there but its really a non issue.

    As far as my other question that you mentioned, I'll add a post with some more detail there. 

    Thanks!

    Thursday, July 14, 2011 8:02 PM
  • Hi "T"

    OK, I've looked into this a little, from the Word side (as I have a sample file for that and not for Excel) and chatted a bit with some colleagues. Apparently it goes something like this:

    The VSTO datacache, since the introduction of the Open XML file formats, is stored in a set of CustomXMLParts (item#.xml, item#.xlm.rels, item#props.xml). The Office application stores all the custom xml parts by default in a "folder" named customXml.

    When VSTO builds a document-level solution it creates the data cache using Open XML. Apparently, it names the folder vstoDataStore. At the point where Word reprocesses the file, it integrates "custom" items into its standard schema, according to the namespace URIs. So all custom xml parts end up in the location defined by the schema, which is named customXML.

    This is all valid and allowed by the Office Open XML spec, so no, it's not a problem :-)


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by TCooperCogdill Wednesday, July 20, 2011 11:16 PM
    Monday, July 18, 2011 10:04 AM
    Moderator