Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

loading different excel files -automation

Hi All,

i have two excel files like Annuites_2016_Plan Master.Xlsx, R_IS_2016_Plan Master, every year we will place the folder in path

so can we automate this ?

can you please help me on this

i tried like below

let vYear=Year(Today());

let vQVD = '..\QVD\Extract\';

for each vFile in FileList('..\ExternalData\*$(vYear) _ Plan Master.xlsx')

//for Each vSheet in '[Plan Master]','[Jan-Jun]'

     let vQVD = replace(vFile, '.xlsx', '.qvd');

     if alt(FileSize('$(vQVD)'), 0) = 0 then

          NextFile:

          LOAD

              *

          FROM $(vFile)

          (ooxml, embedded labels, table is $(vSheet))

          ;

          STORE NextFile INTO $(vQVD) (qvd);

          DROP TABLE NextFile;

     end if

next

//NEXT

Data:

LOAD

    *

FROM ..\QVD\Extract\*.qvd (qvd)

;

Labels (1)
1 Reply
adamdavi3s
Master
Master

You don't really tell us where your issue is here, which bit of it is failing?

I did a recent blog post on some more advanced imports, this one imports text files but goes through and checks if they're new and logs them etc

http://qlikanddirty.com/2016/08/26/loading-only-new-files-with-logfiles/