Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

Loading the data from excel where the fieldname is different but it should be considered as same field.

Hi All,

I have around 45-50 xls file in which the field name is different but it should be consider as the same field.

For example,

CustName as CustName,

CustId as CustId,

field1,

field2

from

Employee_201309.xls

EmpName as CustName,

EmpId as CustId,

field1,

field2

from

Employee_201308.xls

.

.

.

So that means both CustName and EmpName should be considered as CustName only and both CustId and EmpId should be considered as CustId only. So when loading the data from the xls(Employee_*.*) it should take care of this fields, Finally all the data from all the xls should be saved in a QVD.

Can someone please help me on this...

Regards,

Rikab

3 Replies
tresesco
MVP
MVP

Try like this:

Load

          @1 as CustName,

          @2 as CustID,

          Field1,

          Field2

From <>;

Assuming that the column position is identical for the similar data.

jfkinspari
Partner - Specialist
Partner - Specialist

Hi Rikab,

One approach could be to load the columns using @1, and @2 to reference column A, column B etc.

That way the name of the column is of no meaning, and you can still rename like @1 as CustName.

qlikviewforum
Creator II
Creator II
Author

Sorry for some confusion. I had to lead from the csv file not from the xls. May I know whether above will work out in csv or not? Please advice...

Requirement is something like below

CustName as CustName,

CustId as CustId,

Date, //It contains value as jun-2013. Change in the field name is from jun-2013 only. So can we use this as a condition to load the data?

field1,

field2

from

Employee_201309.xls

EmpName as CustName,

EmpId as CustId,

Date,

field1,

field2

from

Employee_201308.xls