C
Clueless Dude
I have an agent in Lotus Notes with the following code:
'******************************************
Dim Excel As Variant
Dim xlWorkbook As Variant
Dim xlSheet As Variant
xlFilename = "C:\GS-35F-4415G.mht"
Set Excel = CreateObject( "Excel.Application" )
Excel.Visible = True '// display the Excel window
Excel.Workbooks.Open xlFilename '// Open the Excel file
Set xlWorkbook = Excel.ActiveWorkbook
Set xlSheet = xlWorkbook.ActiveSheet
Chdir "C:\"
xlWorkbook.SaveAs Filename="C:\GS-35F-4415G.csv",_
FileFormat=xlCSVMSDOS,CreateBackup=False
Call xlWorkbook.close
Call excel.Quit
'*******************************************
Here is what I'm trying to do:
Pull in a file named ......"C:\GS-35F-4415G.mht"
Save it as a CSV file......"C:\GS-35F-4415G.csv"
Open the CSV file and run some macros to clean up the data and the save it
Here is what happens:
First run ...............no errors but file is not generated.
Second run........... error message appears stating false.xls has already
been created.
I look in the root, no file. I looked in "my documents" and sure enough the
false.xls
is there. This file has nothing at all to do with my data.
If I delete this file and run the agent again ......no error but it does
create the false.xls in the "my documents" folder.
Any ideas??
Thanks in advance!!
'******************************************
Dim Excel As Variant
Dim xlWorkbook As Variant
Dim xlSheet As Variant
xlFilename = "C:\GS-35F-4415G.mht"
Set Excel = CreateObject( "Excel.Application" )
Excel.Visible = True '// display the Excel window
Excel.Workbooks.Open xlFilename '// Open the Excel file
Set xlWorkbook = Excel.ActiveWorkbook
Set xlSheet = xlWorkbook.ActiveSheet
Chdir "C:\"
xlWorkbook.SaveAs Filename="C:\GS-35F-4415G.csv",_
FileFormat=xlCSVMSDOS,CreateBackup=False
Call xlWorkbook.close
Call excel.Quit
'*******************************************
Here is what I'm trying to do:
Pull in a file named ......"C:\GS-35F-4415G.mht"
Save it as a CSV file......"C:\GS-35F-4415G.csv"
Open the CSV file and run some macros to clean up the data and the save it
Here is what happens:
First run ...............no errors but file is not generated.
Second run........... error message appears stating false.xls has already
been created.
I look in the root, no file. I looked in "my documents" and sure enough the
false.xls
is there. This file has nothing at all to do with my data.
If I delete this file and run the agent again ......no error but it does
create the false.xls in the "my documents" folder.
Any ideas??
Thanks in advance!!