How do I create a new spreadsheet file using the OOXML SDK that contains multiple worksheets?

I downloaded the OOXML SDK. I need to create a simple Excel spreadsheet that has x worksheets, each containing 4 columns and y rows of data. It's pretty simple, but I can't find an example of how to create sheets anywhere.

+2


a source to share


1 answer


According to the MSDN article How to insert a new sheet into a spreadsheet document , you should be able to add a worksheet to a spreadsheet by adding WorksheetPart

in SpreadsheetDocument

and then getting the first child type Sheets

in the bound Workbook

and adding a new instance to it Sheet

.



+6


a source







All Articles