Solved

Excel 2007 (xlsx) Create New WorkSheet in C#

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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