Discussion Board for collaboration related to QlikView App Development.
Hi,
I have following excel table. this table has many rows.
Temp:
Address | File |
---|---|
C:\Emp Folder | emp.xlsx |
C:\ ID Folder | id.csv |
How I apply variable to get the address= C:\Emp Folder ?
I want to run loop to get the specific record in column.
May be use Peek or use FieldValue() functions.
Temp:
LOAD Address,
File
FROM ...;
FOR i = 1 to FieldValueCount('Address')
LET vAddress$(i) = FieldValue('Address', $(i));
NEXT i
Can you tell me what is the reason to create the variable for specific field value? You can directly use the field value in set analysis or in conditions or you can filter
I'm not sure about your requirement but I remember working on an assignment to load file, path and type details of source files from a spreadsheet and then creating the tables dynamically. Something like below but I had the format of the source also available in my spreadsheet.
If any of the values in the source xlsx is wrong then it would result in reload being failed. Proper debug is required for all source file scenarios prior reloading the full script.
src:
LOAD file,
path,
type
FROM
[..\..\..\load.xlsx]
(ooxml, embedded labels, table is Sheet1);
let vPath = '';
let vFile = '';
let vType = '';
for counter = 1 to NoOfRows('src')
vFile = peek('file',$(counter)-1,'src');
vPath = peek('path',$(counter)-1,'src');
vType= peek('type',$(counter)-1,'src')
LOAD * From
$(vPath)$(vFile)$(vType);
next counter