Dim cnt
Set cnt = CreateObject("ADODB.Connection")
cnt.Provider = "SQLOLEDB"
cnt.ConnectionString= "Driver={SQL Server};Server=127.0.0.1;Database=Northwind;UID=sa;PWD="
cnt.Open
Set recordSet = CreateObject("ADODB.Recordset")
Set recordSet1=cnt.Execute("Select * from Employees")
Set objStream=CreateObject("ADODB.Stream")
recordSet1.Save objStream,1
Set objExcel=CreateObject("Excel.Application")
Set objSheet=CreateObject("Excel.Sheet")
objSheet.Application.visible=true
objSheet.activesheet.cells (1,1).CopyFromRecordset recordSet1
objSheet.Saveas "C:\tests.xls"
objExcel.quit
Set objSheet =Nothing
recordSet1.Close
Syndication
2009-12-22 @ 05:59:03 pm
by siva
I agree, some of the answers ...
2009-11-09 @ 03:59:29 pm
by ashwani
Can anyone tell me how to ...
2009-03-01 @ 12:38:47 pm
by harshada
Hi Can anyone help me out ...
2008-11-20 @ 05:01:49 pm
by Ramesh
some of your answers are wrong....
2008-09-15 @ 03:28:25 pm
by avnish
please post HP0-M80 & HP0-M81 Sample ...
2008-08-22 @ 08:46:36 pm
by Test
Hi dhruv, ...
2008-07-28 @ 08:35:15 am
by suri
Hi all,
This blog is ...
2008-07-28 @ 06:47:17 am
by dhruv
hi experts, this is gud site.. from ...
2008-07-22 @ 11:19:25 pm
by rameshtt
Hi , Here I'm giving a ...
2008-07-17 @ 03:59:04 pm
by lavanya
You can do that by using ...
2008-07-17 @ 09:01:26 am
by suri
How to Highlight the textbox data 'To ...
2008-07-17 @ 08:58:30 am
by suri
Please provide answers to these questions
2008-07-16 @ 03:53:48 pm
by Sreekanth
Hi , ...
2008-07-16 @ 12:50:21 pm
by Admin
We can do the same in ...
2008-07-16 @ 12:34:07 pm
by Admin