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.
mdbarker813Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SriVaddadiCommented:
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.
0
mdbarker813Author Commented:
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.
0
SriVaddadiCommented:
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.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

SriVaddadiCommented:
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.
0
tikusbalapCommented:
Try third party component like Aspose.Cell for .NET

http://www.aspose.com/categories/.net-components/aspose.cells-for-.net/default.aspx

It is good to export whatever you need.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mdbarker813Author Commented:
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
0
tikusbalapCommented:
A simple way is convert rows to comma separated value (csv). Any Excel version can open csv format.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.