Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

pra_kale
Contributor 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

Re: How to save data on their paths using excel sheet reference

Hi Prasad,

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

View solution in original post

6 Replies

Re: How to save data on their paths using excel sheet reference

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
Contributor III

Re: How to save data on their paths using excel sheet reference

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

Re: How to save data on their paths using excel sheet reference

Hi Prasad,

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

View solution in original post

pra_kale
Contributor III

Re: How to save data on their paths using excel sheet reference

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.


Re: How to save data on their paths using excel sheet reference

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

pra_kale
Contributor III

Re: How to save data on their paths using excel sheet reference

Sorry. It's my mistake.

It's working fine..

Thank you very much...