Stupid job, actually. Every day I have to connect to certain server, get an XLS file, open it, save as HTML and upload to web server. Source filename is always the same. To cut it short, the VBS I am working on simply doesn't do it - it returns the "SaveAs method of Workbook class failed" error. And I am really lost here!
I know it's not ASP code, but it's very similar.
Here's the script:
-----START------
set filesys=CreateObject("Scripting.FileSystemObject")
pathstring = filesys.GetAbsolutePathName(".")
pathstring=pathstring & "\"
file = InputBox("Filename,without the extension","Enter")
Set xl = CreateObject("Excel.Application")
xl.visible = false
xl.WorkBooks.Open pathstring & file & ".xls"
xl.ActiveWorkbook.SaveAs pathstring & file & ".htm", xlHTM
xl.ActiveWorkbook.Close
xl.quit
-----END------
The one MsgBox asks (for the testing purposes) for the filename. The script and the XLS file both exist on my Desktop (same folder), and so should the HTM file, too.
Thanx!