Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 HOW TO WRITE DATA IN TO EXCEL

Author  Topic 

dasu
Posting Yak Master

104 Posts

Posted - 2004-12-31 : 05:17:12
Function Main()
Dim objExcel, strPathExcel,strCN
Dim objFile, strGuyFile, intRow
Set objExcel = CreateObject("Excel.Application")
strPathExcel = "c:\test.xls"
objExcel.Workbooks.open strPathExcel
Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
strCN = Trim(objSheet.Cells(1, 1).Value)
objSheet.Cells(2, 2).Value="dAS"
msgbox strCN

ABOVE PROGAM IS READING THE DATA BUT IT IS NOT WRITING IN TO EXCEL SHEET EVEN IT IS NOT GIVING ANY ERROR

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-12-31 : 06:55:53
Is it because you haven't CLOSED/SAVED the workbook???
Go to Top of Page

uplate
Starting Member

10 Posts

Posted - 2005-01-05 : 13:00:23
I have code to for this at home. Reply if you still need it and I will post this tonight (after I find it)!
Go to Top of Page
   

- Advertisement -