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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use for loop for loading files one by one

Hi folks,

1..I have one folder which has 15 files name of file as FileName 0602,numbers are MMDD.

2..I have another file which has current age of xyz product, using this file i want to calculate the current age of 15 files.

so the output is like

For i=0 to Filename(0602)

colums of step1 + new Current_Age(using formula, based on the Current Age of Step2)------> output of this will become step2

repeat this for other files.

Hope I have explained it properly.

Thanks

8 Replies
Not applicable
Author

xls or qvd?

Jason_Michaelides
Partner - Master II
Partner - Master II

You'll you get more help if you make an effort with your questions.  Please provide some specific requirements, with examples where applicable so we may suggest the best solution for you.

Jason

Not applicable
Author

My apologies by mistake I  posted incomplete infomation.

Now I have provided my requirement, kindly have a look.

Thanks

Not applicable
Author

My apologies by mistake I  posted incomplete infomation.

Now I have provided my requirement, kindly have a look.

Thanks

Not applicable
Author

you can load all the 15 filesinto 1 table (try load a,b,c, from c:\path\filename*.xls   (* means ale the files which name start by filename)

  and than join table from the another file

Not applicable
Author

Hi pari

thanks for your reply.

I know the syantax for loading all the files

I wanted to know what to pass in for loop to get the raw file one by one and then how to reuse generated output

Not applicable
Author

LET i = 0

For Each vFile in ("C:\QLIKVIEW\ETC\ETCDIRECTORY")

LET i = i +1

Table$(i):

LOAD *

FROM BLAH*.XLS

NEXT

Not applicable
Author

Hi,

Thanks for reply.

This code is not working at my end.

please give me the write code which I can use it.

Hope my requirement is clear.

Thanks