Link to home
Start Free TrialLog in
Avatar of mdbarker813
mdbarker813Flag for United States of America

asked on

I need to export a DataReader to Excel(.xls v2003 or later) file with out using the Office COM object

I have a project that I need to export a DataReader out to an excel format (.xls v2003 or later). I can not use the Microsoft Office COM object. The office here uses OpenOffice so therefore the COM libary is out. CSV will not meet the need in this case as the management wants to format columns.
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

Use the oledbdata provider and connect to excel as it is a database and you could run your queries against it. IOW even the insert queries.
Avatar of mdbarker813

ASKER

Excel is not on a single machine in the building. This has to be done from scratch. This is an export to an .xls file.
heck this out.

http://social.msdn.microsoft.com/Forums/fi-FI/adodotnetdataproviders/thread/d4302820-4a83-4bae-
9995-91c88abaf87b

You need Microsoft.Jet.Oledb data provider and you could write to an excel (.xls) file as you would store data to a database table.

After going through the thread, let me know if you need help.
check this out.

http://social.msdn.microsoft.com/Forums/fi-FI/adodotnetdataproviders/thread/d4302820-4a83-4bae-
9995-91c88abaf87b

You need Microsoft.Jet.Oledb data provider and you could write to an excel (.xls) file as you would store data to a database table.

After going through the thread, let me know if you need help.
ASKER CERTIFIED SOLUTION
Avatar of tikusbalap
tikusbalap
Flag of Indonesia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sounds like a good product... However, they are cheap asses... hence the OpenOffice... so they sure are not going to buy a $800 third party component... Thx
A simple way is convert rows to comma separated value (csv). Any Excel version can open csv format.