469,913 Members | 2,107 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

Need better solution to export from sql server to multiple worksheets in excel in vb.net app

Nik
I have a VB.NET Web application. I have to export data from SQL Server
to excel. I have 3 Select statements and the results need to go in 3
separate worksheets and the column headers of the sheets are dynamic
i.e. they change according to user criteria.

Currently I am using SQL Server-'OPENDATASource' to export to Excel
and prior to calling opendatasource I use excel automation in vb.net
to create an excel file and write the column headers. This is because
opendatasource expects column headers to be present in the sheet.

2 problems:-
1) It is slow
2) It seems like I have to have excel installed on the server for
excel automation to work, otherwise it gives me 'Cannot create ActiveX
Component'. I do not want to install excel on the server due to
security reasons.

Is there a better way to approach the above scenario? Any help is
appreciated.

Thank you
Nik
Nov 17 '05 #1
0 1000

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Vanessa | last post: by
2 posts views Thread by kelvinweb | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.