Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
AliciaWald-12
Contributor
Contributor

Script to divide excel file into seperate files.

I have an excel file with 2 columns, a Month column with different months from 2 years and an employee count column.

I need to build a script that divides the excel file into separate monthly files, done by "Extract Month".

And I also need to build another script that recreates the original excel file from the set of monthly files.

Help would be appreciated as I am new to Qlik Sense and have never worked with scripts (I'm guessing I write my script in the data load editor).

Thanks in advance! 

Excel file looks like : 

Month Employee Count
01-Aug-21 10
01-Sep-21 25
01-Nov-21 40
01-Dec-21 70
01-Feb-22 100
01-Mar-22 130
01-Apr-22 170
01-Jun-22 200
01-Apr-23 250
01-May-23 300
01-Oct-23 360
01-Dec-23 500
Labels (2)
2 Replies
JoãoPolloni
Contributor III
Contributor III

Hello,

it is from the Subfield field that you will use to solve your problem, I set up an exemple test of how it would look in the script

Extract Month:
LOAD
"Month",

"Employee Count",

SubField(Month, '-', 1) AS Day,

SubField(Month, '-', 2) AS MouthName,

SubField(Month, '-', 3) AS Year;

 

This post below may help you too.😉

https://community.qlik.com/docs/DOC-4657

AliciaWald-12
Contributor
Contributor
Author

Hello,

I need to create separate excel files for each separate month. The segregation is done by "Extract Month".

Thanks!.