Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Export multiple datatables from a C# form to Multiple Excel sheets

How do I export multiple datatables from a C# form to Multiple Excel sheets
using a datagrid with htmlwriter so it is simple, fast and efficient but can
do it to mulitple worksheets. right now that method export html but all on
one spreadsheet

Thanks,
--
TRBG
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Export multiple datatables from a C# form to Multiple Excel sheets

I don't know #C syntax but it will be something like this

1) You can create a list of worksheet names in an array

char SheetNames[] = {"Sheet1","Sheet2"}

then reference the sheets from an arrray

2) Get every worksheet from the workbook

Sheets = Myworkbook.Sheets.Count
for SheetCount = 1 to Sheets {
data= MyWorkbook.Sheets(SheetCount).Range("A1")
}


I haven't used C Language in a while so I'm a little bit rusty. But I think
you can figure out the rest. From excel you should be able to get a count of
the worksheets in a workbook and then reference the sheets by number.
"TRBG" wrote:

How do I export multiple datatables from a C# form to Multiple Excel sheets
using a datagrid with htmlwriter so it is simple, fast and efficient but can
do it to mulitple worksheets. right now that method export html but all on
one spreadsheet

Thanks,
--
TRBG

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
export sheets to multiple new files Tanya Excel Discussion (Misc queries) 8 April 20th 09 10:00 PM
export multiple sheets to multiple excel files Tanya Excel Discussion (Misc queries) 1 April 20th 09 08:57 PM
VBA coding to export multiple calcualtion sheets as webpages [email protected] Excel Programming 1 October 5th 06 02:19 PM
Access export to multiple sheets in Excel Jeff[_46_] Excel Programming 0 March 9th 05 12:06 PM
Export multiple sheets to 1 csv file. Mark Bath Excel Programming 4 January 14th 05 03:09 AM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"