Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

load last n rows from excel

Hello. I hope someone can help me.I want to load the last n rows from a table in excel.How can i do that?

18 Replies
Not applicable
Author

Hello Miguel,

I guess what you propose is probably the best way to do it. Thank you very much.

mike_garcia
Luminary Alumni
Luminary Alumni

Hi,

There must be some order logic for the table, for example by date, order #, invoice #, etc. So Im thinking, you can reorder the table before being read by qlikview. You can use a simple macro (in Excel) to do just that.

For instance, If you want the 10 most recent orders, you first call the macro (maybe with a vbs), save the file (to the same folder or a new one) and then read that modified file with the Prefix First. Something like

First 10 Load * from file.xls;


Just another way to accomplish the same, dont really know if it is the best.

Mike.

Miguel García
Qlik Expert, Author and Trainer
Not applicable
Author

Hi Mike,

Yes,the entries in the table are related to date, so your idea makes sense.Thanks for the reply.

Miguel_Angel_Baeyens

Hello Konstantinos,

I've seen that enabling transformation step, clicking on "Rotate" tab, "Left" twice, table "turns" 180 degrees, so first rows are now last rows. Combined with Mike's suggestion of FIRST n LOAD or WHERE RecNo() <= n you get it!

Regards.

Not applicable
Author

Hello Miguel,

Yes that works!Thank you

Miguel_Angel_Baeyens

By the way, good one Mike! Didn't know about that FIRST n LOAD

Not applicable
Author

Hi All,

very informative stuff.

Can anyone explain abt various Steps in  Enable Transformation Step for excel like Garbage tab(Conditional Tab),Fill,Column,Unwrap.

Although these names are suggestive but i haven't found any good detailed tutorial.

Regards

farolito20
Contributor III
Contributor III

if not exist something to load the last row? like : last 1 load

Not applicable
Author

Good solution. Thank you sir.