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: 
CL91
Contributor
Contributor

Load field with changing name due to typo in Excel

Hi guys,

I am loading this Excel into Qlikview and due to the fact that 2 versions of an Excel are going around, sometimes a field that I want to load is called Numbers and another time it is called Numers (due to a typo in the Excel).

Now my question is, is it possible to load either Numbers or Numers, without having to go in the script to everytime  to make the change manually?

E.g. Sometimes it would look like this (with Numbers):

[Data]:
LOAD Name,
Numbers
FROM
[......xlsx]
(ooxml, embedded labels, table is [Netherlands]);

And sometimes it will look like this (with Numers):

[Data]:
LOAD Name,
Numers
FROM
[......xlsx]
(ooxml, embedded labels, table is [Netherlands]);

Can somebody help me with figuring out how to do this?

Thanks 🙂

Labels (2)
1 Solution

Accepted Solutions
hartleyr
Contributor III
Contributor III

You could ignore the header field, and rename them correctly by pulling in the data without it.  i.e A as Number, B as ... This  way, regardless of the excel file, you would not see a fail.  This would be dependant on both excel files having the same column arrangement, but otherwise should resolve the issue

View solution in original post

5 Replies
Anil_Babu_Samineni

To ignore script failed. You can manage with Alt() like

[Data]:
LOAD Name,
Alt(Numbers,Numers) as Common
FROM
[......xlsx]
(ooxml, embedded labels, table is [Netherlands]);

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
CL91
Contributor
Contributor
Author

Hi Anil,

If I run 

[Data]:
LOAD Name,
Alt(Numbers,Numers) as Common
FROM
[......xlsx]
(ooxml, embedded labels, table is [Netherlands]);

I get an error message saying:

Field not found - <Numers> when I load an Excel with Numbers as field name or Field not found - <Numbers> when I load an Excel with Numers as field name.

Anil_Babu_Samineni

Is that only one field you will get different?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
CL91
Contributor
Contributor
Author

Yes that is the only field.

So only that column header can change between Numers and Numbers.

hartleyr
Contributor III
Contributor III

You could ignore the header field, and rename them correctly by pulling in the data without it.  i.e A as Number, B as ... This  way, regardless of the excel file, you would not see a fail.  This would be dependant on both excel files having the same column arrangement, but otherwise should resolve the issue