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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Export multiple objects to excel (multi sheets) without opening the excel application

Hi, i have a question,

i've followed this thread Export Qlikview objects to multiple Excel sheet and it works perfectly.

But, when i ran the macro it open the excel application. My question is, is it possible to directly save/create the excel file without opening the Ms Excel Appllication ?

Really appreciate your help.

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No, you will need to create an excel instance. But nobody's stopping you from cleaning it up at the end of the macro with something like SET MyExcelApp = Nothing;


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No, you will need to create an excel instance. But nobody's stopping you from cleaning it up at the end of the macro with something like SET MyExcelApp = Nothing;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi,

Ow I see, i got it.

Okay thanks for the explanation

crichter14
Creator II
Creator II

Gysbert - can I ask for a simpler response?  (Keep it Simple Stupid...for me).  I have this code and would like to expand it to multiple tables say (TB01, CH01, LB01, etc, etc), on multiple tabs - one object to a tab, and preferably in xlsx format (instead of xls).

Has anyone seen this explained in video format?  Youtube maybe?  I'm very new to this scripting and I need something to walk me through the logic that CLEARLY explains what each step does.  I'm not able to follow the example very well...though I will keep trying.  Thank you in advance for any assistance.

Code Example:

Sub ExcelFile

DIM ExcelApplication, ExcelWorkbook

SET ExcelApplication = CREATEOBJECT("Excel.Application")

SET ExcelWorkbook = ExcelApplication.Workbooks.Add

ActiveDocument.GetSheetObject("TB01").CopyTableToClipBoard TRUE

ExcelWorkbook.Worksheets(1).Paste

ExcelApplication.DisplayAlerts = FALSE

ExcelWorkbook.SaveAs "C:\Users\admin.cherylr\Documents\test.xls", 56

ExcelApplication.Quit

MsgBox "Export Complete"

End Sub

tamilarasu
Champion
Champion

Hi Cheryl,

Start a new discussion. You might get a quick response. Good luck.

tamilarasu
Champion
Champion

Hi Cheryl,

Start a new discussion. You might get a quick response. I have attached a sample file for your reference. Hope this is what you are looking for. Good luck.