Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
I use the following code to export tables objects to an excel sheet.
It works with Qlikview Desktop, when i try to export from IE9 (with the plug-in). I have this message :
Failure analysis of the macro. Functionality has been lost.
exportExcel
Error. An ActiveX component can not create object: 'Excel.Application'
The message box has "QlikOcx' as title.
Thanks for your help
Regards
Gilles REMY
sub exportExcel
'Open Excel
set XLApp = CreateObject("Excel.Application") ' Define Object
XLApp.Visible = True 'Visible set as true
set XLDoc = XLApp.Workbooks.Add 'Open new workbook
'récupération tableau VL
set VL = ActiveDocument.GetSheetObject("tableVL")
'Copie du tableau dans la feuille Excel
set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted
VL.CopyTableToClipboard true 'Copy data to Clipboard
XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell
'récupération tableau PL et INDUSTRIE
set PLI = ActiveDocument.GetSheetObject("tablePLI")
set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted
PLI.CopyTableToClipboard true 'Copy data to Clipboard
XLSheet.Paste XLSheet.Range("A28") 'Paste data into cell
'récupération tableau TOTAL
set TOTAL = ActiveDocument.GetSheetObject("tableTOTAL")
set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted
TOTAL.CopyTableToClipboard true 'Copy data to Clipboard
XLSheet.Paste XLSheet.Range("B52") 'Paste data into cell
end sub
Is the OCX set to system level macro access?
Hi,
In the macro utilty, I have
Security level set to : System Access
Active Local Security : Allow sytem access
Best regards
Gilles
Open the app from the accesspoint and press Shift+Ctrl+M to see how the macro security level is set.
Hello Gilles-REMY,
I had this same problem and only solved by uninstalling and installing office again.
regards,
Gleybson Fernandes