I downloaded the OOXML SDK. I need to create a simple Excel spreadsheet that has x worksheets, each with 4 columns and y rows of data. It's pretty simple, but I can't find an example of how to create sheets anywhere.
views:
98answers:
1
+2
Q:
How can I create a new spreadsheet file using the OOXML SDK that contains multiple worksheets?
+1
A:
According to the MSDN article How to: Insert a New Worksheet into a Spreadsheet Document, you should be able to add a worksheet to a spreadsheet by adding a WorksheetPart
to a SpreadsheetDocument
, then getting the first child of type Sheets
on the associated Workbook
and appending a new Sheet
instance to it.
Franci Penov
2010-05-20 16:54:33
I think this is what I need
Shawn Simon
2010-05-20 20:53:10