Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

load these N no of xls files into Qlikview

Hi All,

I have two types of excel files in two folders.

EMP_SAL_Timestamp.xls in C\EMP_SAL folder

DEPT_SAL_Timestamp.xls in C\DEPT_SAL folder

How to load these N no of xls files into Qlikview?

Thanks in advance.

Sample Data

EMP:

LOAD * INLINE [

EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO

7369,SMITH,CLERK,7902,17-Dec-1980,800,NULL,20

7499,ALLEN,SALESMAN,7698,20-Feb-1981,1600,300,30

7521,WARD,SALESMAN,7698,22-Feb-1981,1250,500,30

7566,JONES,MANAGER,7839,02-Apr-1981,2975,NULL,20

7654,MARTIN,SALESMAN,7698,28-Sep-1981,1250,1400,30

7698,BLAKE,MANAGER,7839,01-May-1981,2850,NULL,30

7782,CLARK,MANAGER,7839,09-Jun-1981,2450,NULL,10

7788,SCOTT,ANALYST,7566,09-Dec-1982,3000,NULL,20

7839,KING,PRESIDENT,NULL,17-Nov-1981,5000,NULL,10

7844,TURNER,SALESMAN,7698,08-Sep-1981,1500,0,30

7876,ADAMS,CLERK,7788,12-Jan-1983,1100,NULL,20

7900,JAMES,CLERK,7698,03-Dec-1981,950,NULL,30

7902,FORD,ANALYST,7566,03-Dec-1981,3000,NULL,20

7934,MILLER,CLERK,7782,23-Jan-1982,1300,NULL,10

];

5 Replies
ecolomer
Master II
Master II

See thsi example to LOAD all excel & all sheets

Kushal_Chawda

If all the files having the same number of columns and having the same sheet name then you can simply load by * in file name

EMP_SAL:

load *

From

C\EMP_SAL\EMP_SAL_*.xls

DEPT_SAL:

load *

From

C\DEPT_SAL\DEPT_SAL_*.xls


ecolomer
Master II
Master II

For each group of files you can use:

FOR Each Dir in DirList ('$(Root)\'&'*.')

        FOR Each File in FileList ('$(Dir)'&'\EMP_SAL*.xlsx')

       EMP_SAL:

         LOAD

          .... fields

        FROM [$(File)] ....

       NEXT File

NEXT Dir

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can simply write two load statements with wildcards in filename like below, don't make the script complicated by using For loops if you have only two file paths.

Data:

LOAD *

FROM

C:\EMP_SAL\*.xls;

CONCATENATE(Data)

LOAD *

FROM

C:\DEPT_SAL \*.xls;


Hope this helps you.


Regards,

Jagan.