Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load X Number of Lines From Excel File

Is there a way to specify how many lines to load from an Excel file? I have a very large Excel file that somehow got ~900K blank rows (with ~450 columns) that are treated as data. This causes Excel/QlikView to crash when I try to work with the data. I would like to be able to load say only the first 2,000 lines of the file into QlikView if possible.

Thanks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

in your script use First keyword before load statement...something like below:

MyTable:

First 2000

Load

....

from ....;

View solution in original post

6 Replies
mato32188
Specialist
Specialist

Hi noah,

use a RecNo() in where clause...WHERE RecNo() <=2000;

BR

M

ECG line chart is the most important visualization in your life.
Not applicable
Author

When I do

LOAD cccqs_0,
     cccqs_1,
     cccqs_2,
     cccqs_3,
     cccqs_4,
     cccqs_5,
     cccqs_6,
     cccqs_7,
     cccqs_8,
     cccqs_9,
     cccqs_10,
     cccqs_11,
     cccqs_12,
     cccqs_13,
     cccqs_14,
     cccqs_15,
     cccqs_16,
     RecNo()
FROM

(ooxml, embedded labels, table is Sheet3)
WHERE RecNo <=2000;

I get a Script Error that says "Field not found - <RecNo>.

Anonymous
Not applicable
Author

in your script use First keyword before load statement...something like below:

MyTable:

First 2000

Load

....

from ....;

Anonymous
Not applicable
Author

you are missing brackets after RecNo....it is a function. but simpler approach is using keyword "First"

Not applicable
Author

Thanks! This works.

Not applicable
Author

you can also use noofrows function