Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
export sheets to multiple new files | Excel Discussion (Misc queries) | |||
export multiple sheets to multiple excel files | Excel Discussion (Misc queries) | |||
VBA coding to export multiple calcualtion sheets as webpages | Excel Programming | |||
Access export to multiple sheets in Excel | Excel Programming | |||
Export multiple sheets to 1 csv file. | Excel Programming |