Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
ashok1203
Contributor II

Export Qlikview object to .xlsx format on PostReload

Hi, 

I am able to export the same with .xls format by using the ExportBiff keyword in Macro. But, i want to export it to .xlsx format in Qlikview 12.0. 

If i am doing the same by using ExportBiff it was creating the file but in invalid format. 

Please reach out to me if anything disconnects. 

Thanks in Advance...!

 

Regards,

Ashok

AAK
2 Replies
Frank_Hartmann
Honored Contributor

Re: Export Qlikview object to .xlsx format on PostReload

try like this:

 

Sub XLSX_Export
Filename = "Report"
set obj = ActiveDocument.GetSheetObject("CH01") 
set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
set xlDoc= objExcel.Workbooks.Add
Set ASheet = objExcel.ActiveSheet
ASheet.Application.DisplayAlerts = False
ASheet.Range("A1").Select
obj.CopyTableToClipboard true
ASheet.Paste
objExcel.DisplayAlerts = FALSE
ASheet.SaveAs "C:\Users\Admin\Desktop\"&Filename&".xlsx"
objExcel.Quit 
end Sub
ashok1203
Contributor II

Re: Export Qlikview object to .xlsx format on PostReload

Hi, 

Thanks for the response. 

When i am trying to execute the macro it was throwing error on below line. 

set objExcel = CreateObject("Excel.Application")

Can you help me to get resolve, i am using QV12.0 SR5.

Regards,

Ashok

AAK