Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pra_kale
Creator III
Creator III

How to save data on their paths using excel sheet reference

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.

stalwar1

anilbabu

digvijay

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Prasad,

Please find the working example in the below attached zip file. Good luck.

View solution in original post

6 Replies
tamilarasu
Champion
Champion

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;

pra_kale
Creator III
Creator III
Author

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..

                    

CodePolicy_noBranch
500001123456213
50000123456156
tamilarasu
Champion
Champion

Hi Prasad,

Please find the working example in the below attached zip file. Good luck.

pra_kale
Creator III
Creator III
Author

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.


tamilarasu
Champion
Champion

Have you checked the attached file? I have tested only with your files. It is working as you mentioned.

pra_kale
Creator III
Creator III
Author

Sorry. It's my mistake.

It's working fine..

Thank you very much...