Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to export table to excel using document postreload trigger

I have tried the macro below but it does not work. Any suggestions?

Sub BasicExportToExcel

DIM ExcelApplication, ExcelWorkbook

SET ExcelApplication = CREATEOBJECT("Excel.Application")

SET ExcelWorkbook = ExcelApplication.Workbooks.Add

ActiveDocument.GetSheetObject("TB02").CopyTableToClipBoard TRUE

ExcelWorkbook.Worksheets(1).Paste

ExcelApplication.DisplayAlerts = FALSE

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

ExcelApplication.Quit

MsgBox "Export Complete"

End Sub

0 Replies