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

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

Why is loading this CSV file generating nothing?

When I try to load this attached file in QlikView, after I click "Finish" and "ok on the "Edit Script", QlikView just becomes empty instead of displaying the data from the file. Why is this?

14 Replies
el_aprendiz111
Specialist
Specialist

Hi,

Directory;
LOAD [Race/ethnicity],
Year,
[Rate of birth to women ages 18-19],
[Distribution of male children born to women ages 18-19],
[Distribution of female children born to women ages 18-19],
[Rate of birth to women ages 20-24],
[Distribution of male children born to women ages 20-24],
[Distribution of female children born to women ages 20-24]
FROM
[..\..\Documents\Downloads\ratebirth.csv]
(
txt, utf8, embedded labels, delimiter is ',', msq);
csv.png

vishsaggi
Champion III
Champion III

As Fer suggested just remove an extra space in [Race/Ethnicity] it should work.

Not applicable
Author

I just used your script, but I still get nothing afterwards

Not applicable
Author

I just remove the extra space, but I still get nothing afterwards

el_aprendiz111
Specialist
Specialist

hi,

petter
Partner - Champion III
Partner - Champion III

It is obviously a bug. Which version of QlikView are you running? I am running QlikView 12.1 SR2. The others that have tried to help you might be running some version of QlikView that doesn't have this bug...

Solution#1: A work-around to be able to read your file could be:

LOAD

  @1 AS [Race/ethnicity],

     @2 AS Year,

     @3 AS [Rate of birth to women ages 18-19],

     @4 AS [Distribution of male children born to women ages 18-19],

     @5 AS [Distribution of female children born to women ages 18-19],

     @6 AS [Rate of birth to women ages 20-24],

     @7 AS [Distribution of male children born to women ages 20-24],

     @8 AS [Distribution of female children born to women ages 20-24]

WHERE

  RecNo()>1

;

LOAD

  *

FROM

(txt, codepage is 1252, no labels, delimiter is ',');

Solution#2:

For a more dynamic solution that could be used for any table that has extra spaces at the end of any fieldname in a CSV:

TEMP:

LOAD *

FROM

(txt, codepage is 1252, no labels, delimiter is ',');

headers =  '';

FOR i=1 TO NoOfFields('TEMP')

  headers = headers & '@' & i & ' AS [' & Peek('@$(i)',0,'TEMP') & ']' & If(i<NoOfFields('TEMP'),',') ;

NEXT

RATEBIRTH:

LOAD $(headers)

RESIDENT TEMP

WHERE RecNo()>1;

DROP TABLE TEMP; headers=;i=;

swuehl
MVP
MVP

Mi Koll, could you be bit more specific what happens when you reload your script (I assume you actually performed a reload)?

Could you post a screen shot of the reload progress dialog or the document log you can enable in Settings - Document properties?

What does the table view (open with CTRL-T after reload) show?

Note that QV won't show any data in the front end until you add list boxes, charts, etc to the UI.

Not applicable
Author

I'm using Qlikview 12.10 SR3''

I tried both of your solutions, and I still get nothing afterwards

Not applicable
Author

Screenshot (16).pngScreenshot (14).png

after I hit Reload,I still get nothing. Attached are the reload progress and the table