Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
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]);

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?

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