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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
laujerry
Creator
Creator

Use Macro to export excel

I want to export objects to different excel sheet

I know there is an excellent from Stefan but I have not yet got an understanding

QlikTip #32: Exporting multiple QV objects to a single Excel document

So just want to ask about the following code

Why, if I replaced the SaveAs path with an xls extension, will the file fail to be recognized as a proper xls format?

Warning like "The file you are trying to open is in a different format than specified by the file extension..."

Set xlobj = CreateObject("Excel.Application")

xlobj.DisplayAlerts = false

Set wrkbook = xlobj.Workbooks.Add

Set newwrksht = xlobj.Application.Worksheets.Add

wrkbook.SaveAs "C:\test.xls"

Thanks

Labels (1)
1 Solution

Accepted Solutions
laujerry
Creator
Creator
Author

I got it already, you need to define the file format as 56 for xls

wrkbook.SaveAs "C:\test.xls", 56

View solution in original post

1 Reply
laujerry
Creator
Creator
Author

I got it already, you need to define the file format as 56 for xls

wrkbook.SaveAs "C:\test.xls", 56