Home All Groups Group Topic Archive Search About

Create XLS file from Query? (VB, OLEDB, ADO.NET 2.0)

Author
29 Mar 2006 8:30 PM
Confused Newbie
I need to create new Excel 2003 XLS files containing a single worksheet that
has the results of a database query (a combination of text, integer, and
date columns).  Can someone please point me to an example of how to do this
in a VB2005/ADO.NET 2.0 Winforms app, *WITHOUT* using Interop (Office will
*not* be installed on the machine generating the file).  Thanks!

Author
30 Mar 2006 1:36 AM
Jim Hughes
Visual Studio Tools for Office Developer may meet your needs.

http://msdn.microsoft.com/office/understanding/vsto/

The developer machine will need Office, but the deployment machine may not
depending on the solution used.

http://msdn.microsoft.com/office/understanding/vsto/articles/default.aspx?pull=/library/en-us/odc_vsto2005_ta/html/officevstobenefitsregistration.asp

has a specific example of a server based solution for creating documents.

Show quote
"Confused Newbie" <nope@spam.duh> wrote in message
news:OsmWb%232UGHA.5828@TK2MSFTNGP10.phx.gbl...
>I need to create new Excel 2003 XLS files containing a single worksheet
>that has the results of a database query (a combination of text, integer,
>and date columns).  Can someone please point me to an example of how to do
>this in a VB2005/ADO.NET 2.0 Winforms app, *WITHOUT* using Interop (Office
>will *not* be installed on the machine generating the file).  Thanks!
>
Author
30 Mar 2006 1:59 PM
Paul Clement
On Wed, 29 Mar 2006 15:30:21 -0500, "Confused Newbie" <nope@spam.duh> wrote:

¤ I need to create new Excel 2003 XLS files containing a single worksheet that
¤ has the results of a database query (a combination of text, integer, and
¤ date columns).  Can someone please point me to an example of how to do this
¤ in a VB2005/ADO.NET 2.0 Winforms app, *WITHOUT* using Interop (Office will
¤ *not* be installed on the machine generating the file).  Thanks!
¤

What is the data source (SQL Server? Access?) of your database query?


Paul
~~~~
Microsoft MVP (Visual Basic)

AddThis Social Bookmark Button