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: 
curiousfellow
Specialist
Specialist

Concatenate adds sheet name to fields from second file

I want to concatenate two excel files, one sheet each. Because the fieldname in both files are different, I rename them when loading second file, so they become the same.

I qualify all fieldnames and unqualify the key fields.

Now Qlik adds the sheet name to the fieldnames of the second file, is there a way to avoid that ?

My script looks like this:

Qualify '*';

Unqualify '%key_*';

Table_name:

Load employee as %key_employee

name,

street ,

city

From excel_file1 

(ooxml, embedded labels, table is Sheet1);

concatenate (Table_name)

load 

employeenum as %key_employee.

employeename as Table_name.name

streetemployee as Table_name.street

cityemployee as Table_name.city

from excelfile2

(ooxml, embedded labels, table is employee);

 

The fieldnames in the table are now:

%key_employee,

Table_name.name,

Table_name.street,

Table_name.city,

employee.Table_name.name,

employee.Table_name.street,

employee.Table_name.city

Labels (2)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

One way is to enter an "Unqualify *;" just in front of "Concatenate".

Another way is to remove the "Qualify *;" in the beginning of the script. You don't really need that.

View solution in original post

3 Replies
hic
Former Employee
Former Employee

One way is to enter an "Unqualify *;" just in front of "Concatenate".

Another way is to remove the "Qualify *;" in the beginning of the script. You don't really need that.

curiousfellow
Specialist
Specialist
Author

Thank you, this solved the problem. I still don't understand why it added the name of the sheet, where it normally doesn't.

The qualify is needed because I load more data from other tables in my original script.

danm84306-2
Contributor
Contributor

I figured out the issue...although I was using a test script with exit script, a previous tab had a QUALIFY* statement which kept forcing the split.