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: 
IgorGol
Contributor III
Contributor III

Files Concatenation

Hi,

I have a folder with 2 excel (xls files - lets name it : 1.xls , 2.xls)

Their Template  is the same (same columns)

I want to Concatenate them and every week  when another xls file will added (3.xls) 

I want to add it automatically 

I will apreciate any help with script that I need to write

Thanks!

Igor

 

 

1 Solution

Accepted Solutions
nikitadeshwal
Partner - Contributor III
Partner - Contributor III

Igor,

Suppose you have ID column in your Excel and that is unique then you can use the following script to load only those ID's which is not present in previous excels 

LOAD
*
FROM [lib://Connection_Name/Folder_Name/*.xlsx]
(ooxml, embedded labels, table is Sheet1)where not Exists(ID);

By this, If the ID already exists it will skip that else will append to data.

Thanks,

Nikita Deshwal

View solution in original post

3 Replies
nikitadeshwal
Partner - Contributor III
Partner - Contributor III

You can use the following code 

load
*
FROM [lib://Connection_Name/Folder_Name/*.xlsx]
(ooxml, embedded labels, table is Sheet1);

First, create a new connection till that folder where excels are stored.

IgorGol
Contributor III
Contributor III
Author

Thanks,

And if in the second file there are values that I don't want to load (cause I have them in the first file) 

What should I write?

 

Thanks!

nikitadeshwal
Partner - Contributor III
Partner - Contributor III

Igor,

Suppose you have ID column in your Excel and that is unique then you can use the following script to load only those ID's which is not present in previous excels 

LOAD
*
FROM [lib://Connection_Name/Folder_Name/*.xlsx]
(ooxml, embedded labels, table is Sheet1)where not Exists(ID);

By this, If the ID already exists it will skip that else will append to data.

Thanks,

Nikita Deshwal