Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview. I have Data coming from excel which includes historical orders data as well as daily orders data. I get daily orders excel files as
Orders_06-15-2012.xlsx
Orders_06-16-2012.xlsx....
I created QVD for all historical data and taking the daily files through varaibale. But when there is no Source file on any particular day in the folder the reolad fails .
Attached are example files of the Orders_HistoricalData.xlsx and Orders_06-15-2012.xlsx , Orders_06-16-2012.xlsx
Appreciate help regarding why the reload fails when there is no Source file for the next day
The script i am using is
LET vdate=Date(Today(),'DD-MM-YYYY');
LET vDD=Date(Today(),'DD');
LET vMM=Date(Today(),'MM');
LET vYYYY=Date(Today(),'YYYY');
Data:
LOAD Distinct
Date,
OrderNumber,
[Order QTY],
[Order $]
FROM
(qvd);
Concatenate
LOAD Distinct
Date,
OrderNumber,
[Order QTY],
[Order $]
FROM
(ooxml, embedded labels, table is Sheet1);
STORE data INTO C:\Users\Monica\Desktop\Qlikview\HistoricalData.QVD
Hi,
before concatenate line add:
set ErrorMode=0; // let QV ingore any script error from this point
and before STORE line add:
set ErrorMode=1; // return to normal error handling
You can also write something like that:
if isnull(filesize( 'c:\Qlikview\\file.txt' ) )=0 then
load......;
end if;
The "filesize" function returns the file size. when no file was found, null will return.
The load statement will run only if the conditional will be true.