Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to modify my script so that all my table field name can be enter at XLS file ?

Hi All

I like to start a new thread , as this will benefit other people who may have similar requirement,

Mr Staffan have help me modify the script , now my raw data file name can be edit at excel file , and user don't need to touch on the QVW load script.

I like the field name , to enter from excel ? So that i can decide how many field i want to load. For example now i loading 4 field :-

  FileBaseName() as SOURCE,

  @1:9T as [cust_id],

  @10:38T as [company_pay],

  if(right(@81:99T,1)='-', '-' & left(@81:99T, len(@81:99T)-1),@81:99T) as curren

  FileBaseName() as vFile1d1,

  @1:9T as [vFiled2],

  @10:38T as [vFiled3],

  if(right(@81:99T,1)='-', '-' & left(@81:99T, len(@81:99T)-1),@81:99T) as vFiled4

And i am allow to tick or set how many field i want to load. ( Let raw data file i can load 1 to 4 by change the NoOfRows )

So when development i can load more field , and after production i only load those field need. And i don't need to modify the script.

Hope Some one can share with me.

Paul Yeo

2 Replies
paulyeo11
Master
Master
Author

My QVW and raw data

stabben23
Partner - Master
Partner - Master

Paul,

it will load as many FileName you enter in the Excel. It Count all rows here

FOR i=0 TO NoOfRows('FileList') -1 

NoOfRows in the FileList table, which is the Excel. FileList is the name of the Exceltable.