Qlik Community

New to Qlik Community

Discussion board for questions on how to use Qlik Community and its features.

Announcements
This forum is for questions and information about how to use the Qlik Community.
Please do not post product related questions here.
Select the correct forum from: Qlik Product Forums
Not applicable

Help with format conversion!!!

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!!

1 Solution

Accepted Solutions
mwoolf
Not applicable

Re: Help with format conversion!!!

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

4 Replies
mwoolf
Not applicable

Re: Help with format conversion!!!

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.

Not applicable

Re: Help with format conversion!!!

I tried with value of xlWorkbookDefault but it doesn't work. It's the same.

mwoolf
Not applicable

Re: Help with format conversion!!!

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

Not applicable

Re: Help with format conversion!!!

It's work!!! Thank youuuu!!!

Community Browser