Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I had a requirement to fetch last Row alone from the excel. The problem here is, it takes long time to fetch entire data, so instead i need only Last Row to use it in QV Reporting, Plz help me..
Hi,
If you know the last record no so put code some thing like suppose there is 10 records and you want to laod 10 records as you ask
Example:--
Load
Fields,
......
......
From
where RecNo() = 10 ;
Rgds
Anand
It's not constant .The row count will defer every time
Hi,
Use
LET a = NoOfRows('tab1');
and then load statement
Load
Fields,
......
......
From
where RecNo() = 10 ;
Rgds
Anand
Hi,
Once load your table with load and this LET a = NoOfRows('Data'); line and after that put
Where RecNo() = $(a); this condition to your load statement
Data:
Load
Fields
........
From
Data
Where RecNo() = $(a);
LET a = NoOfRows('Data');
Rgds
Anand
Loading entire data takes me 10mins of time. I need the report to be loaded in 1min.
That is the problem, Last row does not contain maximum value in it, so i can order by also.
Thanks alot for your replies.
Hi,
Ok see the attached sample file if you does not want to keep Data table so delete it otherwise you keep that by this you load last row A10 value in single load
Data:
LOAD * Inline
[
Info
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
];
LET a = NoOfRows('Data');
Newdata:
load
Info as NewInfo
Resident Data
Where RecNo() = $(a);
//DROP Table Data;
HTH
Let me know about this
Rgds
Anand
see the attached qvw
and excel
hope this helps you
Here u r calculating last row of it after loading entire Data from excel. I don't want to load the entire file because it's time consuming...
For fetching the first record in the excel, i m having 'First' keyword, but for Last?
Hi,
Ok understood if you use header option in the load then you are able to load last row.
Ex:-
Data:
LOAD *
FROM
Data.xlsx
(ooxml, embedded labels, header is $(a) lines, table is Sheet1);
LET a = NoOfRows('Data');
Rgds
Anand