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

QlikView should pull automatically from "New Updated Excel Sheet" by latest date.

Hi,

I've a Sales folder that contains sales related excel sheets coming in automatically on daily basis. How to get the latest one as my source file automatically?

6 Replies
Not applicable
Author

Ho w u are getting automatically. is there any job ?

load * from

\c\..\ sales.xl

where date >='11/11/2014';

ali_hijazi
Partner - Master II
Partner - Master II

on every reload save the maximum date in a qvd File

if your table is T

SortT:

noconcatenate

load * resident T order by Date asc;

drop table T;

let vLastDate = peek('Date',-1,'SortT');

Save:

Load $(vLastDate) as LastDate;

Autogenerate 1;

Store Save into File.qvd;

then on the successive reloads read everything from database where date is > the max Value the you read from QVD file saved

I can walk on water when it freezes
Not applicable
Author

Yes, there is a job. this Sales folder is getting updated from SAP Database.

Not applicable
Author

where date >='11/11/2014'    put this after laoding xl file

for automation put like

load *,

from  sales.xls

where date >today()-1;  it loads   todays data  if u want yesterdays data also then go like   >=today()-1

Not applicable
Author

Hi,

Let vLast_reloadtime=reloadtime();

Table:

Load *

         from Tablename where date>($vLast_reloadtime);

or else Let vToday=today();

           Let  vPath= 'C:/'&($vToday);

Table1:

sql select * from Tablename;

store Table1 into ($vPath).xls;

shree909
Partner - Specialist II
Partner - Specialist II

Hi

Try this

SalesFolder:   //Here Your getting all the file names that are present in the source folder//

LOAD

    // RecNo() AS Records,

    FILENAME() AS KEY

FROM

[..\DATA\SALESREPORT *]

(ooxml, embedded labels, table is Sales);

MAX_FILE:  // Using resident your loading only the file that has maxtimestamp//

LOAD

MaxString(KEY)  AS MAX_FILE

RESIDENT SalesFolder;

LET vMaxFile=peek('MAX_FILE','-1','MAX_FILE');  // Storing that maxfile in a variable//

DROP TABLE SalesFolder;

SalesFolderWithMaxDate: // loading only the file that has max timestamp from the source folder//

lOAD *

FROM

[..\DATA\$(vMaxFile)]

(ooxml, embedded labels, table is Sales);

/*  U can Create a task by daily or hourly ( On qlikview Server) how your files are updated on the source folder */

Let me know if this works

Thanks