Exporting to excel

J

John

Hi

I have a winform db app with access backend db using strongly typed dataset.
Is there a way to run a query on a table and export the output into an excel
sheet with a specified name, overwriting the excel file if it already exists
at the destination. Is there a way to do all this by press of a button so
its easy for the end user?

Many Thanks

Regards
 
E

eBob.com

cfps.Christian said:
Do some research in using ODBC against an Excel table. This will
allow you to write SQL commands against the Excel table so you might
be able to do a delete on the spreadsheet and a bulk insert and be
done with it.

Your last option should be to use the Excel interop as it can be a
little unwieldy and a little too much precision.

I'm not the OP, but ... it never ceases to amaze me what useful information
I pick up here. I had not idea such a capability existed. THANKS!

BTW, in my experience the interop interface is not only unwieldy but it is
also difficult to find thorough documentation.

Bob
 

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

Top