Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to export tables to excel

This line gives error

set XlApp = CreateObject("Excel.Application")

'ActiveX' component can't create object:'Excel.Application' error on IE

The settings are all fine at the module level and at the document level (Server tab).

One point to note is i am developing directly on the qlikview server and it doesn't have excel installed. Could this be the reason?

Thanks

Ram

5 Replies
ergustafsson
Partner - Specialist
Partner - Specialist

Hi Ramkunar,

Yes, this might be the reason. Test on a machine where it is installed.

Regards,

Erik

Jean-Philippe
Partner - Contributor II
Partner - Contributor II

Hi Ramkumar,

Do you have this parameters below ?

Requestred Module Security = System Access

Current Local Security = Allow System Access.

System Access.jpg

Best regards,

Jean-Philippe.

vadimtsushko
Partner - Creator III
Partner - Creator III

Hi Ramkunar.

Note that if you want just export chart to excel without any sophisticated preprocessing (if you basically have to emulate context menu command `Send to Excel`) - you can do it without having Excel installed.

Use `exportBiff` method, something like:

set chart = doc.GetSheetObject("CH01")

chart.ExportBiff("AbsolutePathToFile.xls"))

Regards, Vadim

Not applicable
Author

Hi, exportbiff works at server without the excel installed. But my requirement is to export multiple charts into respective sheets in the same excel file. Is that something achievable using exportbiff? I looked around but can't find anything useful.

Thanks,

Ram

vadimtsushko
Partner - Creator III
Partner - Creator III

I believe exportbiff exports only one chart to one excel file. So if it is crucial requirement for you, you stuck with Excel automation method. That implies you need have Excel installed.