Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
1. can any one give me the answer
How to load multiple excel files in a single script is it possible? explain scenario wise.
yes.
use following code
set QVDPATH = 'E:\Qlikview\LAL\Air Exports\'; //set a variable which carries the
Path of the location where excel
files stored.
set ErrorMode=0; //set a variable ErrorMode=0 to make
the loop nonstop even when occur an
error.
Data:
LOAD * INLINE [ //load data to avoid synthetic key
Test
To Avoid Syn Key
];
for each File in filelist('$(QVDPATH)*.xls') //read excel files and set up the loop
Example: // table name to be loaded data
Concatenate(Data)
load * from [$(File)] (biff, embedded labels, table is [Jan$]); // if sheet name is matching with name specified, then load the data. Here specify name is Jan.
Concatenate(Data)
load * from [$(File)] (biff, embedded labels, table is [Feb$]); // if sheet name is matching with name specified, then load the data. Here specify name is Feb.
.
.
.
next
File // to call the next file on the path folder
STORE Example
into Example.Qvd;
// storing data into a QVD file
Drop
table Data;
// dropping table Data
-regards,
Dinu1
LOAD *
FROM [<path>\File1.xlsx] (ooxml, embedded labels, table is sheet1);
LOAD *
FROM [<path>\File2.xlsx] (ooxml, embedded labels, table is sheet1);
LOAD *
FROM [<path>\File3.xlsx] (ooxml, embedded labels, table is sheet1);