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: 
Narz
Partner - Contributor III
Partner - Contributor III

Get available month name from Excel Sheet

Hi all,

I have Excel sheet with names like JAN2023, FEB2023,APR2023, MAY2023. User may or may not add additional months for the year.

The video https://www.youtube.com/watch?v=9kvI2c_bWTQ shoow the way to loop by giving the month names in loop.

Is there a way I can loop and fetch existing month without the need to add the months every time user add a new sheet,  something like dynamic fetch based on the available month data in the Excel?

Thanks in advance.

Nat

Labels (2)
1 Solution

Accepted Solutions
Parthiban
Creator
Creator

First u fixed all the months in for loop and then you add errormode=0 in your Qlik script. 

Errormode = 0 means suppose if any error occur during reload in your script means it will automatically skipped that error and successfully run the application.

Now u load the data, u have available sheets data. Suppose end-user add one additional sheets it will automatically reflected in this script.

This is for month if you want to add year means use variables for current year.

View solution in original post

5 Replies
Aditya_Chitale
Specialist
Specialist

Do you want to  fetch starting from the least month sheet available in the excel (for eg: Jan 2020) or you want to fetch yearly data ie starting from Jan 2023 to current month ?

 

Regards,

Aditya

Parthiban
Creator
Creator

First u fixed all the months in for loop and then you add errormode=0 in your Qlik script. 

Errormode = 0 means suppose if any error occur during reload in your script means it will automatically skipped that error and successfully run the application.

Now u load the data, u have available sheets data. Suppose end-user add one additional sheets it will automatically reflected in this script.

This is for month if you want to add year means use variables for current year.

steeefan
Luminary
Luminary

If users add data to the sheet manually anyways, you could introduce a "Status" sheet. There then users entering data and creating new tabs would have to write the tabs' names and add a new entry for each newly added tab. You would then iterate over that list and get data for each entry from the tab with the same name.

Narz
Partner - Contributor III
Partner - Contributor III
Author

Hi @Aditya_Chitale I want to fetch all months from the least (whichever is the least) month till the latest.

Thanks

Narz
Partner - Contributor III
Partner - Contributor III
Author

Hi @Parthiban, This works for me. Thank you.