Export to excel

  • Thread starter Thread starter Cdude
  • Start date Start date
C

Cdude

I need to export into excel but not into a new worksheet each time.I
want to add the exported dataset onto an existing spreadsheet that
already has rows on it. I may have not written this to well. Please
any suggestions. Thanks
 
Cdude pisze:
I need to export into excel but not into a new worksheet each time.I
want to add the exported dataset onto an existing spreadsheet that
already has rows on it. I may have not written this to well. Please
any suggestions. Thanks

The general idea is to use OLE DB provider with Microsoft Jet engine
which is capable of performing some SQL statements on Excel workbooks.
To make a long story short: first you must create a "table" in Excel
with CREATE TABLE statement (it will create a worksheet) and then you
can use regular INSERT statements to add new rows to the table, which
effectively will add rows to existing worksheet.

This article should help:

http://support.microsoft.com/kb/316934
 
I need to export into excel but not into a new worksheet each time.I
want to add the exported dataset onto an existing spreadsheet that
already has rows on it. I may have not written this to well. Please
any suggestions. Thanks

Probably the best way to do it is to use some of the third party
component. I can recommend you GemBox.Spreadsheet .NET component. You
can find an example of exporting to dataset at: http://www.gemboxsoftware.com/LDataSet.htm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top