Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

dynamic loading files

Hi All,

How to load these files dynamically?

 

EAST_SAL_2016.xls
EAST_COMM_2016.xls
WEST_SAL_2016.xls
WEST_COMM_2016.xls
NORTH_SAL_2016.xls
NORTH_COMM_2016.xls
SOUTH_SAL_2016.xls
SOUTH_COMM_2016.xls

Thanks in advance.

11 Replies
Anonymous
Not applicable
Author

What do you mean by dynamically?

If the file name changes, you can use wildcards to load them.

Not applicable
Author

I have used this script.

But I am looking for better way.

LOAD *,

FileName() as FileName

FROM

*.xlsx

   (ooxml, embedded labels, table is [$(*)]);

trdandamudi
Master II
Master II

The way you are loading is perfect and I don't think there is any better way. If you think I am missing the point can you explain with little more details...

Anil_Babu_Samineni

I am not sure your question as I understand, you can load using qvd. Before that I've to ask one thing. In these files all field are same

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Digvijay_Singh

Are these file having same structure, are they auto concatenating sometimes and sometime not when new fields added? Do you need only one time load or require incremental load?

Not applicable
Author

SAL is one structure, COMM is different structured data.

ToniKautto
Employee
Employee

If the files have different structure the answer to your questions depends on the difference in structure. Perhaps the data is suitable to force into same table, or perhaps it fit better in two (or more) tables. You will have to provide samples of the structure and your expectations to enable any detailed suggestion.

marcus_sommer

A better way could be to load with a filelist-scan like: Dynamically Loading Multiple Excel Files.

- Marcus

adamdavi3s
Master
Master

In this case I would use two loads in your loop in an if with a wildmatch to check the filename

So if it sees SAL it does load 1 to load fields x,y,z

if it sees COMM it does load 2 to load fields 1,2,3

Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.