Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anouklbs
Contributor
Contributor

Boucle STORE Excel to QVD

Hello,

I want to convert several Excel files contained in a folder A to save them in another folder B under QVD format. Is there a solution by "for loop" to convert each file one by one under QVD format by the "STORE" function?

Thanking you in advance,

Labels (1)
1 Reply
Taoufiq_Zarra

@Anouklbs  Maye be like this:

suppose you have Excel file in this path : C:\Users\admin\Downloads\qvdsave\*.xls

and you want copy all file into this path : C:\Users\admin\Downloads\qvdsave\B in qvd format :

you can use this script :

   for each vFile in filelist('C:\Users\admin\Downloads\qvdsave\*.xls')
   
   let vFileName = subfield(subfield(vFile,'\',-1),'.',1) ;

    YourTableName:

    load *,'$(vFile)' as Filename

    from [$(vFile)]
    (biff, embedded labels, table is Sheet1$);

     STORE YourTableName INTO  'C:\Users\admin\Downloads\qvdsave\B\$(vFileName).qvd';

next vFile

 

output:

Taoufiq_Zarra_0-1652258757715.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉