views:

886

answers:

2

I have a large spreadsheet in Excel 2007 OpenXML format that I want to manipulate in xml programmatically. Excel saves it using the shared strings method which, while more efficient, complicates the process. Does anyone know if there is an option buried in Excel to save using inline strings, or maybe a utility already build to place all the strings back inline within the sheet.xml again? Haven't had much luck googling and I'd rather use an existing solution rather than building my own converter if possible. Thanks.

A: 

It should be pretty easy to do so (just iterate through though each page/row/shared string cell looking up its value in the table and then changing its value and type), but why would you want to (unless you were doing some XSLT or something)? By inlining everything, you probably increase file size. Just make sure any cell you modify you change to inline string.

foson
+2  A: 

See a tutorial at http://www.sadev.co.za/content/reading-and-writing-excel-xlsx-c-part-iv-putting-it-together

salgo60
Thanks for the link to that. Obviously that was quite a while ago I asked, but I'll keep it for future reference.
AgentThirteen