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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

import data from HTML file

Hi Team,

I want to import data from a website say for example-http://updateox.com/india/state-wise-population-of-india-as-per-2011-census/

while reloading the QVW file, I am getting error Field not found, but when i recheck it the field name is already present on the website.

I have attached my load script screenshot and error msg screenshot.

Please help me out with a solution.

Regards

Priyanka

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

I did a quick test and it is actually a kind of bug... In HTML two or more consequtive spaces are really just one space. I noticed that the two fields [State  /UT Code] and [India/State  Union Territory #] har two consequtive spaces before respectively /UT and Union....

Just removing a single space in both of them let me load without error:

LOAD [State /UT Code],

     [India/State/ Union Territory #],

     Population,

     Males,

     Females,

     Percent

FROM

[...//updateox.com/india/state-wise-population-of-india-as-per-2011-census/]

(html, utf8, embedded labels, table is @1);

View solution in original post

7 Replies
prieper
Master II
Master II

Seems if if there is a hidden row with the totals in this table ...

You may validate by executing LOAD * FROM .....

You may use a script like:

Data:

LOAD

     @1            AS [State  /UT Code],

     @2            AS [India/State/  Union Territory #],

     @3            AS Population,

     @4            AS Males,

     @5            AS Females,

     @6            AS Percent

FROM

[http://updateox.com/india/state-wise-population-of-india-as-per-2011-census/]

(html, codepage is 1252, no labels, table is @1)

WHERE RECNO() > 2;

HTH Peter

Anonymous
Not applicable
Author

Save the html page into your Desktop and try from there...

ramoncova06
Partner - Specialist III
Partner - Specialist III

switch the load to *

LOAD *

FROM

[http://updateox.com/india/state-wise-population-of-india-as-per-2011-census/]

(html, codepage is 1252, embedded labels, table is @1);

petter
Partner - Champion III
Partner - Champion III

Try this instead:

LOAD

     @1 AS [State /UT Code],

     @2 AS [India/State Union Territory #],

     @3 AS Population,

     @4 AS Males,

     @5 AS Females,

     @6 AS Percent

FROM

[http..........]

(html, utf8, no labels, table is @1);

Obviously QlikView isn't very fond of / in a column-name ... a bug maybe ...

Even this works well too:

LOAD

     *

FROM

[http..........]

(html, utf8, embedded labels, table is @1);

petter
Partner - Champion III
Partner - Champion III

I did a quick test and it is actually a kind of bug... In HTML two or more consequtive spaces are really just one space. I noticed that the two fields [State  /UT Code] and [India/State  Union Territory #] har two consequtive spaces before respectively /UT and Union....

Just removing a single space in both of them let me load without error:

LOAD [State /UT Code],

     [India/State/ Union Territory #],

     Population,

     Males,

     Females,

     Percent

FROM

[...//updateox.com/india/state-wise-population-of-india-as-per-2011-census/]

(html, utf8, embedded labels, table is @1);

Anonymous
Not applicable
Author

Hi Priya,

the webfile wizard is generating an extra space between state and /UT Code

as per your query it is like this

[State  /UT Code],

and i tried this [State /UT Code] . it did worked

see the attached Qvw file

Not applicable
Author

Agreed with Petter Skjolden. This one I tested and works fine. Attached is the QVW.