Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
YC-Bisley
Contributor
Contributor

Load Excel with multiple tabs and use each tab name as a new column

Hi all,

Is there a way I can load all tabs in one Excel (with a number of tabs), with identical fields in each tab.

 

What I want is :

- to load data in each tab 

- for each tab loaded, add the tab name as a new column

- consolidate all tabs into one table 

 

My data input

YCBisley_0-1709704252504.png

My desired output

YCBisley_1-1709704269855.png

 

 

Labels (1)
1 Reply
marcus_sommer

You need just to know how the tabs are named respectively having any logic to derive them, for example if they relate to existing periods or similar stuff. And then you may do something like this:

for each tab in 'tabA', 'tabB', 'tabC'
   t: load *, '$(tab)' as Source from Excel.xlsx (ooxml, embedded labels, table is [$(tab)]);
next