Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - VB.NET: export query directly to Excel

Reply
 
Old 02-04-2009   #1 (permalink)
Mike J.


 
 

VB.NET: export query directly to Excel

I have searched for methods to export a SQL query directly to an Excel
document, but all I can find is exporting from a GridView to Excel (which I
do have working). Is there a way to export the resulting data of a SQL query
and send it to an Excel document without binding that to a GridView first?

We are using Visual Basic .NET 2005 and Oracle 10g databases. I have most
of the project's work in the asp.net side including the SqlDataSource with a
small amount of code-behind stuff in the .vb files.

Thank you!

My System SpecsSystem Spec
Old 02-09-2009   #2 (permalink)
Jerry


 
 

Re: VB.NET: export query directly to Excel

There are several ways:
- Excel Automation (needs to have Excel installed)
- Use OLEDB
- Read/Write directly to native format (there are commercial lib and
open source lib, such as http://code.google.com/p/excellibrary/ )

J.

On 2$B7n(B5$BF|(B, $B>e8a(B2$B;~(B51$BJ,(B, Mike J. <Mi...@xxxxxx> wrote:
Quote:

> I have searched for methods to export a SQL query directly to anExcel
> document, but all I can find is exporting from a GridView toExcel(which I
> do have working). Is there a way to export the resulting data of a SQL query
> and send it to anExceldocument without binding that to a GridView first?
>
> We are using Visual Basic .NET 2005 and Oracle 10g databases. I have most
> of the project's work in the asp.net side including the SqlDataSource with a
> small amount of code-behind stuff in the .vb files.
>
> Thank you!
My System SpecsSystem Spec
Old 02-09-2009   #3 (permalink)
Cor Ligthert[MVP]


 
 

Re: VB.NET: export query directly to Excel

Mike.

There are more posibilities (as well on this website)

http://www.vb-tips.com/DataGridViewExport.aspx

Cor

"Mike J." <MikeJ@xxxxxx> wrote in message
news3EDBF73-CD66-4B4D-BD03-222290AF8A37@xxxxxx
Quote:

>I have searched for methods to export a SQL query directly to an Excel
> document, but all I can find is exporting from a GridView to Excel (which
> I
> do have working). Is there a way to export the resulting data of a SQL
> query
> and send it to an Excel document without binding that to a GridView first?
>
> We are using Visual Basic .NET 2005 and Oracle 10g databases. I have most
> of the project's work in the asp.net side including the SqlDataSource with
> a
> small amount of code-behind stuff in the .vb files.
>
> Thank you!
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
RE: Export from AD to excel filter by group VB Script
VB :Export datagrid to excel .NET General
export grid to excel .NET General
openning Excel or Access files directly Vista General
openning Excel or Access files directly Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46