Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have attached 1 sample data file in which there are different different codes are mentioned along with other parameters and in another file their paths are mentioned where these files needs to be get's saved.
Can you pl help how i can save the data in their respective path as mentioned in the excel file.
Thanks in advance.
Hi Prasad,
Please find the working example in the below attached zip file. Good luck.
Hello Prasad,
File:
LOAD Sr.no,
Code,
Name,
Path
FROM
(ooxml, embedded labels, table is Sheet1);
Temp_Data:
LOAD Code,
Policy_no,
Branch
FROM
(ooxml, embedded labels, table is Sheet1);
LET vFileData = NoOfRows('File');
FOR i=0 to $(vFileData)-1
LET vCode = Peek('Code',$(i),'File');
LET vFileName = Peek('Path',$(i),'File') & Peek('Name',$(i),'File');
NoConcatenate
Data:
Load *
Resident Temp_Data where Code = '$(vCode)';
If NoOfRows('Data') >0 Then
STORE Data into [$(vFileName)].qvd (qvd);
DROP Table Data;
ENDIF
NEXT
DROP Tables File, Temp_Data;
Thanks Nagaraj for your help..
But when I have executed the code which you have given I have observed the files are not get saved in the folders but 1 qvd. is get created.
I want the files should get saved as per the paths mentioned in the file on the basis of their codes,
For e.g. from the file "Data_19 Feb 2018" below given out-put should be get saved in the path mentioned in the file "Path" E:\Qlikview\Broker\500001.csv and so on..
Code | Policy_no | Branch |
500001 | 123456 | 213 |
500001 | 23456 | 156 |
Hi Prasad,
Please find the working example in the below attached zip file. Good luck.
Thanks for your help again..
by this code now the files are getting extracted but all the files are getting saved in the one location only.
Where as file should get saved at different locations.. for e.g.
AgencyNirav should be get saved under E:\Qlikview\Agency\
BrokerPiramid should be get saved under E:\Qlikview\Broker\
Paths are mentioned in the Path excel file.
Thanks in advance.
Have you checked the attached file? I have tested only with your files. It is working as you mentioned.
Sorry. It's my mistake.
It's working fine..
Thank you very much...