Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

rduvall33009
New Contributor

Has anyone been able to store multiple table into a single excel file via the load script?

I want to be able to save multiple tables into a single excel document, but not through a macro just on the load script.  Each tab in the Excel would have the name of table's being used in that spread sheet.  I know you can store a single table into a csv and open in Excel.  Also you can load from Excel using specific named tabs that you can control in the load script editor.

Fish:

LOAD * INLINE

[

Fish, Count

Red, 1

Blue, 2

]

Birds:

LOAD * INLINE

[

Bird, Count

Tucan, 4

Parrot, 1

]

The Excel output would have a tab called Fish and a second tab called Birds.

STORE * FROM Fish INTO Pets.csv (txt):

STORE * FROM Birds INTO Pets.csv (txt):

Just replaces the csv each time with the new.  I want the process to be automated such that the output files are made after the refresh of the QVW.  Your response and time is much appreciated.

3 Replies

Re: Has anyone been able to store multiple table into a single excel file via the load script?

This isn't possible through normal load script.

You may be able to use a macro, but I'm not even sure about that...

rduvall33009
New Contributor

Re: Has anyone been able to store multiple table into a single excel file via the load script?

Thanks Nicole I appreciate your time and response.  That's what I have been finding unfortunately as that it can't be done in a load script.  The fall back I am considering is the macro.  I would just need the macro to run after the refresh.  I've found a macro that starts when you click a button in the QVW, but trying to get to full automation where the excel file is just made on own.  Outside of Qlik I'm also thinking of having 2 excel files.  One to receive the csv outputs from loadscript with the second looking at those file/s to make calculations about the data and making pivot tables to get around load script limitation as well.

Re: Has anyone been able to store multiple table into a single excel file via the load script?

This thread looks to have some good information about executing macros in the load script:

Execute a Macro inside load script

I hope it helps!

Community Browser