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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export excel

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

4 Replies
m_woolf
Master II
Master II

Is the OCX set to system level macro access?

Not applicable
Author

Hi,

In the macro utilty, I have

Security level set to : System Access
Active Local Security  : Allow sytem access

Best regards

Gilles

m_woolf
Master II
Master II

Open the app from the accesspoint and press Shift+Ctrl+M to see how the macro security level is set.

Not applicable
Author

Hello Gilles-REMY,

I had this same problem and only solved by uninstalling and installing office again.

regards,

Gleybson Fernandes