Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
livio218526
Creator
Creator

Store data in the same File Excel but different sheet

Hello to all, I would like to know if there is a way to store data in the same excel file but in different sheets, using the load script.

 

Thanks,

Livio

Labels (4)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

I don't think that its possible to direct a store to more than on tab in a sheet using the load script alone.  You could write a VBS or VBA macro to consolidate two outputs into a single file after the load is complete, and you may be able to find some code searching here and/or Excel macro coding web sites.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
davidfdezcalleja
Contributor II
Contributor II

Hi,

for example, in this file excel there is two diferent sheets (AirPassangers and Hoja1)

Captura.JPG

using the load script

Captura2.JPG

 

I hope it fits you.

livio218526
Creator
Creator
Author

Hello,

I am referring to the store and not to the load

davidfdezcalleja
Contributor II
Contributor II

Add these lines in bold

[AirPassengers]:
LOAD
[ID] AS [AirPassengers.ID],
[Date] AS [AirPassengers.Date],
[Year] AS [AirPassengers.Year],
[Month] AS [AirPassengers.Month],
[AirPassengers] AS [AirPassengers.AirPassengers]
FROM [lib://datos/AirPassengers_prueba.xlsx]
(ooxml, embedded labels, table is AirPassengers);

Store * from AirPassengers into 'lib://datos/AirPassengers.qvd';

[Hoja1]:
LOAD
[ID] AS [Hoja1.ID],
[Date] AS [Hoja1.Date],
[Year] AS [Hoja1.Year],
[Month] AS [Hoja1.Month],
[AirPassengers] AS [Hoja1.AirPassengers]
FROM [lib://datos/AirPassengers_prueba.xlsx]
(ooxml, embedded labels, table is Hoja1);

Store * from Hoja1 into 'lib://datos/Hoja1.qvd';

livio218526
Creator
Creator
Author

No, in thisway i stored in two different qvd....

jonathandienst
Partner - Champion III
Partner - Champion III

I don't think that its possible to direct a store to more than on tab in a sheet using the load script alone.  You could write a VBS or VBA macro to consolidate two outputs into a single file after the load is complete, and you may be able to find some code searching here and/or Excel macro coding web sites.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
andoryuu
Creator III
Creator III

Qlik will tell you to get NPrinting.  We have it here (although I can't recommend it) and it is used to generate multi-sheet excel outputs.

simonaubert
Partner - Specialist II
Partner - Specialist II

Hello @livio218526 

You can't as of today.
However, you can promote this idea by voting
https://community.qlik.com/t5/Suggest-an-Idea/QS-Script-store-with-more-format/idi-p/2005668

 

Best regards

Bi Consultant (Dataviz & Dataprep) @ Business & Decision