Alyanto
asked on
Working with Microsoft.Office.Interop.Excel
I am trying to write using interop an excel book with multiple sheets. I find that I am unable to get a good code sample to work with. What I am looking for in the simplest level is a guide that shows how to add multiple worksheets to a workbook or even better still a very small code sample. The is quite a bit more to the project but this appears to me the only stumbling block to completing the project.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank for the lead
ASKER
Press button for the spreadsheet to be made
Call class xlFactory withcontructor receiving dataset and some structures to define the layout of the spreadsheet
xlFactory make(dataset, formatInfo)
in memory Excel application using Interop
xlFactory make xlWorkbook(dataset, Formatinfo)
For each table in the dataset
make a sheet(enum FormatInfo = tablename)
next
Save the file
do stuff with file i.e. email, open app on decktop etc
Where I keep failing to understand is the creation of the various elements. I am sure it is really very straight forward but both of the example are fine but the seem to skip over the creation of the book, sheet etc from interop