开发者

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

开发者 https://www.devze.com 2022-12-30 14:17 出处:网络
I downloaded the OOXML SDK. I need to create a simple Excel spreadsheet that has x worksheets开发者_Python百科, each with 4 columns and y rows of data. It\'s pretty simple, but I can\'t find an exampl

I downloaded the OOXML SDK. I need to create a simple Excel spreadsheet that has x worksheets开发者_Python百科, 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号