Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody! Y need convert a .xls file to .xlsx format. Y have a macro that convert the file but I get an error when opening the file. excel says it is corrupted.
The line of the macro is:
objExcel.ActiveWorkbook.SaveAs(file & ".xlsx"), FileFormat=xlOpenXMLWorkbook
I have Qlikview 11, and Office 2013.
Thank youu!!
xlOpenXMLWorkbook has a numeric value in Excel VBA.
VBScript doesn't know that numeric value.
You need to find that numeric value in Excel and use the number in place of xlOpenXMLWorkbook
Try:
objExcel.ActiveWorkbook.SaveAs(file & ".xlsx"),51
That would work in VBA, but VBScript doesn't know the value of xlOpenXMLWorkbook.
You can look up that value in Excel and rewrite the line.
I tried with value of xlWorkbookDefault but it doesn't work. It's the same.
xlOpenXMLWorkbook has a numeric value in Excel VBA.
VBScript doesn't know that numeric value.
You need to find that numeric value in Excel and use the number in place of xlOpenXMLWorkbook
Try:
objExcel.ActiveWorkbook.SaveAs(file & ".xlsx"),51
It's work!!! Thank youuuu!!!