
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to load a number of rows within a specific range.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can set the header to 2500 lines and then load the first 2500 records. Something like:
[Table X]:
First 2500
Load
@1 as Employee_number
@2 as Company_name
@3 as Organization_number
@4 as Postal_code
from [analysis.xlsx]
(ooxml, no labels, header is 2500 lines, table is Sheet1);
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can set the header to 2500 lines and then load the first 2500 records. Something like:
[Table X]:
First 2500
Load
@1 as Employee_number
@2 as Company_name
@3 as Organization_number
@4 as Postal_code
from [analysis.xlsx]
(ooxml, no labels, header is 2500 lines, table is Sheet1);
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Gijsbert!!
Your answer was very helpful and work out pretty well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I needed the same, so using the Helpfy Answer I created this.
I work for me, since I'm using really big data, and we had some memory issues. Now it's fine.
let _step = 3;
let _cont = 0;
let _rows = 30;
let _carq = 0;
let _header = 0;
for _cont=0 to $(_rows) step $(_step)
let _header = $(_step)*$(_carq);
let _carq = $(_carq) + 1;
TabX:
LOAD @1 as Cod,
@2 as Desc
FROM
TesteNrLinhas.txt (txt, codepage is 1252, no labels, delimiter is '\t', msq, Header is $(_header) lines)
WHERE
RowNo() < $(_step)
;
Store TabX into TabX$(_carq).txt (txt);
drop table TabX;
next
