473,322 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Create/copy worksheets in an Excel doc in a C# app

Dan
I have a c# app that creates and Excel doc, I would like
to know how to create new worksheets (tabs) in the excel
doc using c#?
Nov 15 '05 #1
1 1851
Dan,

On the Worksheets object exposed by the Workbook object (through the
Worksheets property), you can call the Add method to add a new Worksheet.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dan" <dp******@nabn.com> wrote in message
news:09****************************@phx.gbl...
I have a c# app that creates and Excel doc, I would like
to know how to create new worksheets (tabs) in the excel
doc using c#?

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Iris | last post by:
I have 8 text files (tab delimited) that I would like to import into an Excel workbook as 8 individual worksheets but I cannot find any example code on this subject. Can anyone help me please???? ...
7
by: KC | last post by:
Does anybody know how to add a specific number of worksheets to an Excel spreadsheet through VB.net? I'm trying to export some datatables to an excel file, but I only want as many sheets in the...
3
by: James Wong | last post by:
Dear all, I have an old VB6 application which can create and access Excel object. The basic definition statements are as follows: Dim appExcel As Object Dim wkb1 As Excel.Workbook Dim wks1...
0
by: Kay | last post by:
Hi all, I want to copy an entire row from a worksheet to another worksheet, when I set the excel app = visible and step thru the code I can actally see a row is appended to another worksheet,...
4
by: paul.chae | last post by:
I have a table in Access with about 3000 records. There are ~60 unique values in the ID field for the 3000 records. What I would like to do is automatically generate multiple Excel worksheets...
4
by: Abdhul Saleem | last post by:
Hi, I am recieving error ActiveX component can't create object in the following line in the asp page. set ExcelApp = CreateObject("Excel.Application") Previously this code was working fine....
2
by: stjones1 | last post by:
My company has implementd Vista with IE7 and office 2007. We also use Sharepoint extensively for team sites and division portals. I am in Sharepoint consultation/support. One user just moved a...
2
by: deepadevid | last post by:
Hi, when I tried to copy a worksheet programmatically in Excel 2007 the chartObjects are not getting copied. I am getting empty charts inside my new worksheet. This is working in Excel 2003. ...
2
by: Gary Dunne | last post by:
Hi All, I'm struggling to find the correct syntax for creating a Pivot table in an excel file via VB . Net 2005 The Excel help file is not particularly helpful where parameters are concerned...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.