Exporting to excel

  • Thread starter Thread starter John
  • Start date Start date
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
 
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
 
Back
Top