Solved

Excel 2007 (xlsx) Create New WorkSheet in C#

Posted on 2007-12-04
4
11,766 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Printing 1 60
How come this regular expression allows "e"? 14 45
insert value of checklistbox checked 4 32
ASP.NET - Why is accordion not working? 3 19
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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