Solved

Excel 2007 (xlsx) Create New WorkSheet in C#

Posted on 2007-12-04
4
11,730 Views
Last Modified: 2010-04-21
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
Comment
Question by:tradeline
  • 3
4 Comments
 
LVL 14

Accepted Solution

by:
Daniel Junges earned 500 total points
ID: 20410189
0
 

Author Comment

by:tradeline
ID: 20422209
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
 

Author Closing Comment

by:tradeline
ID: 31412784
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
 

Author Comment

by:tradeline
ID: 20425203
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now