Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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")
'Save the file and quit excel
''curWorkBook.SaveAs filePath
''curWorkBook.Close
''excelFile.Quit
'Cleanup
Set curWorkBook = nothing
Set excelFile = nothing
End Sub
have you selected allow system access option?