Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can multple excels be loaded in Qlikview

Can multple excels be loaded in Qlikview

9 Replies
arulsettu
Master III
Master III

arulsettu
Master III
Master III

ychaitanya
Creator III
Creator III

Hi

Please refer to this.

Load Multiple excel sheets using For loop

Thanks

Chaitanya Y

its_anandrjs

Yes, but depends on the type fields in excel if all file has same sheet then you can use just * symbol to read all file available in the folder

LOAD *

FROM

(ooxml, no labels, table is sheet1);

Load multiple sheets and excel files

Or

LOAD *

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

Regards

Anand

ashfaq_haseeb
Champion III
Champion III

HI,

Try something like this

Directory;

LOAD *

FROM

[*.xlsx]

(ooxml, embedded labels, table is Sheet1);

Hope it helps

Regards

ASHFAQ

ashwanin
Specialist
Specialist

Yes,

Multiple Excels can be loaded into QlikView.

Use *.xls to load all excel 2003 files.

Use *.xlsx to load all excel files with this format.

SunilChauhan
Champion II
Champion II

if you have all excel with similar fields an  different Name  and at same location the use

LOAD *

FROM

[Path\*.xlsx]

(ooxml, no labels, table is sheet1);

other wise

http://community.qlik.com/thread/105143

Sunil Chauhan
amit_saini
Master III
Master III

Shruti,

Code to Access all files in directory (subdirectories)

SUB DoDir (Root)

FOR each File in filelist(Root& '\*.xls')

Tab1:

LOAD <<Field Names>>

FROM

[$(File)]

(biff, embedded labels, table is <<Table name>>$);

NEXT File

FOR each Dir in dirlist (Root&'\*')

CALL DoDir(Dir)

NEXT Dir

END SUB

CALL DoDir('Your Directory');

Code to Access All sheets in a Excel work book

Directory;

for a=1 to 3

LOAD employee

FROM

Looping\constructs1.xlsx // this is the excel sheet name

(ooxml, embedded labels, table is Sheet$(a));// $ sign allows to access the value of a

Next

Code to Access all sheets in a excel work book and convert to QVD

For a=1 to 4

Directory1:

LOAD employee

FROM

Looping\constructs1.xlsx

(ooxml, embedded labels, table is Sheet$(a));

//STORE Directory INTO C:\Users\chaitanyas\Desktop\Looping\Directory$(a).QVD;

Next

STORE Directory1 INTO C:\Users\amits\Desktop\Looping\Directory.QVD;

Drop Table Directory1;

Directory;

LOAD employee

FROM

Looping\Directory.QVD

(qvd);

Thanks,
AS

Anonymous
Not applicable
Author

Hi   Shruti

try this script which will load from multiple excel files and also multiple sheets

for each file in FileList('R:\Harsha\qlikview2nd\*.xlsx');

  ODBC CONNECT32 TO [Excel Files;DBQ=$(file)];

  tables:

  SQLtables;

  DISCONNECT;

  FOR i = 0 to NoOfRows('tables')-1

  LET sheetName = purgeChar(purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39)), chr(36));

  Table:

  Load *,'$(sheetName)' as SheetName

  From $(file)(ooxml, embedded labels, table is [$(sheetName)]);

  NEXT i

  Drop table tables;

  //set tables=Null;

  Next file

Regards

Harsha