Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Export to Excel 2007

I have a simple macro to export a chart to Excel in xlsx format. The macro works and creates the file but when I try to open the file in Excel I get a message "Excel cannot open the file 'Temp.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."

My macro code is as follows:

sub ExcelFile

  set obj = ActiveDocument.GetSheetObject("CH02")

  obj.Export "C:\Temp.xlsx",","

end sub

I have read through other forum posts and tried various functions and options but without success.

Thanks

Kevin Long

3 Replies
Not applicable
Author

Any ideas or feedback on this would be appreciated.

Thanks

Kevin

Not applicable
Author

Try this:

Capture.JPG

ngulliver
Partner - Specialist III
Partner - Specialist III

Hi, Kevin.

Have you tried exporting as C:\Temp.xls ? I had the same problem and it worked fine with .xls.

Cheers,

Neil