ASV
14 years agoContributor
SaveAs Excel file
HI
My exe (which I am testing now) is generating a Excel file.
I want to save this Excel file to a specific folder.
I write this code
Set objExcel = Sys.OleObject("Excel.Application")
objExcel.SaveWorkspace(strpath)
objExcel.Quit
objExcel = Null
But then I can't open it.
I have a message "Excel cannot open the file 'Name.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."
I think that this problem linked to my code. What to do open the Excel file?
Thanks in advance
My exe (which I am testing now) is generating a Excel file.
I want to save this Excel file to a specific folder.
I write this code
Set objExcel = Sys.OleObject("Excel.Application")
objExcel.SaveWorkspace(strpath)
objExcel.Quit
objExcel = Null
But then I can't open it.
I have a message "Excel cannot open the file 'Name.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."
I think that this problem linked to my code. What to do open the Excel file?
Thanks in advance