|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
import data from sql to excel using vb.neti whould u like to import data from sql server database into excel
sheet using vb.net On 29 Aug 2006 01:59:54 -0700, "Deep" <deep8***@gmail.com> wrote: ¤ i whould u like to import data from sql server database into excel¤ sheet using vb.net Below is one method you can use: Dim ExcelConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & "c:\Test Files\ExcelWB.xls" & ";" & _ "Extended Properties=Excel 8.0;") ExcelConnection.Open() Dim ExcelCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO [Orders] FROM [Orders] IN '' [ODBC;Driver={SQL Server};Server=(local);Database=Northwind;Trusted_Connection=yes];", ExcelConnection) ExcelCommand.ExecuteNonQuery() ExcelConnection.Close() Paul ~~~~ Microsoft MVP (Visual Basic)
Unicode conversion
Net.WebRequest - Close Connection Resource and Time consuming stuff Please explain the difference between close, dispose, = nothing on sqlClient. Returning an array from a function? Visual Studio beginner questions MAking a bound form from a query GDI Handle leak when adding a simple Textbox First Report in VB2005 - Print Preview Formato numerico |
|||||||||||||||||||||||