Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I'm having an issue and i have trailed the internet for an answer but cant find one. Can you help??
Scenario
I have this folder and every month a new file(Excel) will be saved into it by someone else.
This month
IRL 1.1 Sep
IRL 1.1 Oct
IRL 1.1 Nov
Next month
IRL 1.1 Sep
IRL 1.1 Oct
IRL 1.1 Nov
IRL 1.1 Dec
and so on...... I want to write a script that will load
I want to write a script that will load & concatenate all the files in the folder every month.
I don't want to have to re point my script each month. All i want to have to do is refresh my script and Qlikview will realise that there is now four files in the folder and load and merge them all.
"Things to remember"
I have read about loops etc but I'm not really sure.
Can you help on this please?
Thanks
Andrew
I have found an answer to this. A simple one.
Seeing that all the files will be in the same folder and the only thing that will be different in there names will be the "month at the end" i just removed this and replaced with *and it seemed to work.
Thanks for all your help!!
let path_Pallet = '..\..\qlik\myFile*.xlsx';
for each File in filelist (path_Pallet)
MyFile:
LOAD *
FROM $(File)
(ooxml , embedded labels , table is Foglio1);
next File
Let me know
LOAD
*
FROM
[IRL 1.1 *.xlsx]
(ooxml, embedded labels, table is Sheet1)
Where Month(Date#(TextBetween(FileName(),' ','.',2),'MMM')) <= Month(Today());
Hi Thanks for the above.
That is still only seems to be loading in one of my data sources.
My script
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='£#,##0.00;-£#,##0.00';
SET TimeFormat='hh:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
let path_Pallet='\\HORODC26\DFSROOT\TEAM DATA\HORSHAM.opd\Indemnity Performance\Functional - Claims Insight\Exception Reporting\Qlikview\IRL\Extracts\IRL 1.1\IRL 1.1 Sep.xlsx';
for each file in FileList(path_Pallet)
IRL1:
load*
From
(ooxml, embedded labels, table is Sheet1);
next file
for each file in FileList(path_Pallet)
IRL1:
load*
From
(ooxml, embedded labels, table is Sheet1);
next file
Hi Manish
Thanks for the above, but my file names will not always be month names.
Also in your example i cant see where the your script has a file path to go and grab the report??
Thanks
Andrew
I have used relative path.... you can obviously use my script and can use the absolute path instead..
I still cant seem to get it working. I dont know what i am doing wrong????
My current script
*******************************************************************************************************************************
let path_pallet='S:\HORSHAM.opd\Indemnity Performance\Functional - Claims Insight\Exception Reporting\Qlikview\IRL\Extracts\IRL 1.1.xlsx'; (((This is the path of the the folder)))
for each file in FileList(path_pallet)
IRL1:
LOAD*
from $(file)
(ooxml, embedded labels, table is Sheet1);
next file
*******************************************************************************************************************************
Any thoughts, i cant use anything which bases around date as the files might not have dates in the name
I have found an answer to this. A simple one.
Seeing that all the files will be in the same folder and the only thing that will be different in there names will be the "month at the end" i just removed this and replaced with *and it seemed to work.
Thanks for all your help!!
If you see our reply, we also have done the same.. Instead of Month, we have used *...