Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11808
  • Last Modified:

Excel 2007 (xlsx) Create New WorkSheet in C#

I'm using the SpreadsheetDocument object to create a spreadsheet, and everything is working fine.  The only stumbling block I'm having is I can't seem to create new Worksheets.  I can retrieve a list of all worksheets in the system using XPath, but as my XML skills are limited, I'd like some pointers on how to create new Sheets in the Workbook from scratch.

Gracias.
0
tradeline
Asked:
tradeline
  • 3
1 Solution
 
Daniel JungesCommented:
0
 
tradelineAuthor Commented:
Thanks junges, but I've already incorporated most of the code I need using the Microsoft.Office.DocumentFormat.OpenXml.Packing assembly, and adding new worksheets are the only thing that's missing.

I was hoping to leverage the same assembly and code structure.

sk
0
 
tradelineAuthor Commented:
Ended up converting to the open source version.  There are a few bugs in the code, but they're documented on codeplex and it's a much simpler facade.  Thanks.
0
 
tradelineAuthor Commented:
For future reference, and people searching this solution, DO NOT use the CodePlex ExcelPackage.  Use (Microsoft.Office.DocumentFormat.OpenXml.Packaging) instead.

The CodePlex library (as of Dec 2007) is incredibly buggy.  Half the functions aren't implemented, and there are several major bugs left unfixed.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now