Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have an automated extraction every week, in a zip or rar file, with the following structure :
And I'd like to get a final structure like the following one :
Where in each Group qvd is stored all the excel files inside the subfolder
How could I do that?
I've done a sample of my structure in case someone could help me with that.
Best regards, Marcel
There are the script, pal:
SET ErrorMode = 0;
SUB DoDir(Root)
FOR each File in filelist( Root & '\*.xlsx')
TRACE '$(File)';
Data:
LOAD *
,FileBaseName()
,RowNo()
FROM
[$(File)]
(ooxml, embedded labels, table is Hoja1);
NEXT File
FOR each Dir in Dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('C:\Users\Mindaugasb\OneDrive - UAB Biovela\Profile\Downloads\AllTablesEXCEL')
SET ErrorMode = 1;
STORE Data into 'C:\Users\Mindaugasb\OneDrive - UAB Biovela\Profile\Downloads\Data.qvd' (qvd);Take a look at the out coming result:
I have added few additional lines to the file name and the lines counter.
There are the script, pal:
SET ErrorMode = 0;
SUB DoDir(Root)
FOR each File in filelist( Root & '\*.xlsx')
TRACE '$(File)';
Data:
LOAD *
,FileBaseName()
,RowNo()
FROM
[$(File)]
(ooxml, embedded labels, table is Hoja1);
NEXT File
FOR each Dir in Dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('C:\Users\Mindaugasb\OneDrive - UAB Biovela\Profile\Downloads\AllTablesEXCEL')
SET ErrorMode = 1;
STORE Data into 'C:\Users\Mindaugasb\OneDrive - UAB Biovela\Profile\Downloads\Data.qvd' (qvd);Take a look at the out coming result:
I have added few additional lines to the file name and the lines counter.
Thanks for the try @MindaugasBacius
Your output is the following :
And my desired output is the following :
Where each folder is fully stored in a QVD.
Regards, Marcel.
Hello @MindaugasBacius
I've done it thanks to your script, thank you, I trully apreciate it.
I've just move the data store after the for next file loop
Regards, Marcel.