Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] split excel file in several xml files

Hello!
What I want is to split some excel content into several xml files separated by dept.
I have an excel file with 3 columns
dept, name, email
sales, jonh, jonh@domain.com
sales, sarah, sarah@domain.com
mkt, sue, sue@domain.com
mkt, peter, peter@domain.com
warehouse, etc, etc@domain.com
The problem is the the result is 3 files separated by dept, but only with 1 name and 1 email by dept in each file.
I should have sales.xml with to results, and I only have john... and so on...
This kind of job works if I separate to txt files.
Any idea?
Thanks in advance
0683p000009MDM9.jpg
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I guess the list of departments are fix and do not change every day.
I would do following:
tFileInputExcel ---- tMap ----- (one output for every department) ---- tFileOutputXML
In the tMap you can define for every output a filter (e.g. "sales".equals(row1.dept) )
I would write it in this way, because this way you don't have to deal with empty or null values.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

I guess the list of departments are fix and do not change every day.
I would do following:
tFileInputExcel ---- tMap ----- (one output for every department) ---- tFileOutputXML
In the tMap you can define for every output a filter (e.g. "sales".equals(row1.dept) )
I would write it in this way, because this way you don't have to deal with empty or null values.
Anonymous
Not applicable
Author

Hello jlolling!
Yes you are right, and the departments don't change every day.
Thanks for your help, but i found other solution.
Regarding the picture, as you can see, with the tflow, and a xml file name by department name, I am splitting the excel data in several files. The problem was on the xml. With the right loop element and group, the result was perfect!
Thank you!