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: 
navaneeth79
Contributor II
Contributor II

many files with same fields

I have many files with same field names and I want to load all the files into same table in qlikview script and all the data gets reflected.

1 Solution

Accepted Solutions
techvarun
Specialist II
Specialist II

Are you using Drop statement everywhere?

The tables with same fields gets concatenated and will be dropped on a single drop statement.

in this case use no concatenate before load script to keep the tables.

If it Doesn't solve your problem then explain the issue in detail.

View solution in original post

13 Replies
big_dreams
Creator III
Creator III

what was your issue???

use concatenate to concate tables

Load * from table1;

concatenate

Load* from table2;

and so on..

If you want to loop it search for how to use loop in script.

Regards,

sunny_talwar

You can use For Next loop to load your files

Loops in the Script

navaneeth79
Contributor II
Contributor II
Author

i have few files for example 5 files with file name ABC_ddmmyyyy.xlsx where ddmmyyyy referes to date and this changes according to the file extraction.

the code I used is

load

fileds

from(:path/ABC_*.xlsx);

but I can see data only from the first file

techvarun
Specialist II
Specialist II

Are you using Drop statement everywhere?

The tables with same fields gets concatenated and will be dropped on a single drop statement.

in this case use no concatenate before load script to keep the tables.

If it Doesn't solve your problem then explain the issue in detail.

techvarun
Specialist II
Specialist II

Check the tab name in the excel sheet. it should be same to extract the data

sunny_talwar

Share 2 or 3 files and may be we can show you how it can be done.

big_dreams
Creator III
Creator III

Can you post your entire script over here.

In your script add fileName() as fileName, So that you will get to know which file you are loading.

Regards,

navaneeth79
Contributor II
Contributor II
Author

I cant send the exact code but I will send the sample code:

let say my files are ABC_02022018.xlsx and ABC_05022018.xlsx

my code is

Test:

Load

A,

B,

C,

D,

if(D<100,1,0) as E

from

[$(vG.Path)\folder\ABC_*.xlsx]
(
ooxml, embedded labels, table is Sheet1)

big_dreams
Creator III
Creator III

This must work..

do you have same data in both files????

Take one field in list box & check its frequency.

Regards,