开发者

How can 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开发者_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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜