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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

Setting up Qlikview to export to excel

Hi,

I am getting an error when I use this script to export to excel.

ActiveX component can't create object: 'Excel.Application'

How do I set Qlikview up to enable exporting to excel.

Ans does anyone have the vba they can post for this excel vba tool

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

My script is:

Sub ExcelExpwCaption 

    'Set the path where the excel will be saved  

     filePath = "C:\Test.xls" 

 

     'Create the Excel spreadsheet  

     Set excelFile = CreateObject("Excel.Application") 

     excelFile.Visible = true 

     'Create the WorkBook 

     Set curWorkBook = excelFile.WorkBooks.Add 

     'Create the Sheet 

     Set curSheet = curWorkBook.WorkSheets(1) 

 

     'Get the chart we want to export 

     Set tableToExport = ActiveDocument.GetSheetObject("CH106") 

     Set chartProperties = tableToExport.GetProperties 

     tableToExport.CopyTableToClipboard true 

 

     'Get the caption 

     chartCaption = tableToExport.GetCaption.Name.v 

     'MsgBox chartCaption 

 

     'Set the first cell with the caption 

     curSheet.Range("A1") = chartCaption 

     'Paste the rest of the chart 

     curSheet.Paste curSheet.Range("A2") 

     excelFile.Visible = true 

     'Save the file and quit excel 

     ''curWorkBook.SaveAs filePath 

     ''curWorkBook.Close 

     ''excelFile.Quit 

 

     'Cleanup 

     Set curWorkBook = nothing 

     Set excelFile = nothing 

End Sub

1 Reply
Kushal_Chawda

have you selected allow system access option?