By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,117 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,117 IT Pros & Developers. It's quick & easy.

How do I output a recordset to Excel in VB.Net?

P: n/a
I am trying to output a recordset that I have to Excel XP?

I don't know how to do it. I have the Office 10 COM
Object library reference, and I just need to know how to
take my recordset, locate the excel file, and move the
contents of the recordset to a worksheet.

Any help would be greatly appreciated.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
SR
Hi mike

I had written sometime back a VB.Net function which takes
a dataset as a parameter and then exports all the tables
to a Excel File in separate sheets. Quite a generic
function. Loops thru the tables, then the records and
then ports the data to excel using automation

Later i moved over to a SQL Server DTS approach to improve
performance, where i create a DTS package to do the same
and from my VB.Net function just execute the DTS package

The code for these are lengthy and if i post it here it
gets wrapped(or should i say warped !!! :) ). If u need
the code for the same do mail me at rs*****@hotmail.com

regards,

sr
-----Original Message-----
I am trying to output a recordset that I have to Excel XP?

I don't know how to do it. I have the Office 10 COM
Object library reference, and I just need to know how to
take my recordset, locate the excel file, and move the
contents of the recordset to a worksheet.

Any help would be greatly appreciated.
.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.