Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to create variables using the values in an excel file:
Table:
LOAD
"Variable Name",
"Variable Value",
"Variable Definition"
FROM my_excel_file.xlsx;
let vName = peek([Variable Name], 2);
Trace test: $(vName);
My trace function is returning test:
and the variable is not being created.
Good solution. But I'll point out that if there happened to be duplicate VariableNames, this would be a subtle bug,
Let vNoOfVariables = FieldValueCount ('VariableName') ;
Better to use
Let vNoOfVariables = NoOfRows ('Application_Variables') ;
-Rob
Application_Variables:
LOAD VariableName,
VariableDefinition
FROM
Test_27.xlsx
(ooxml, embedded labels, table is Test);
Let vNoOfVariables = FieldValueCount ('VariableName') ;
For v = 0 to $(vNoOfVariables)-1
Let vName = Peek('VariableName',$(v),'Application_Variables');
Let $(vName) = Peek('VariableDefinition',$(v),'Application_Variables');
Next v
Drop Table Application_Variables;
Good solution. But I'll point out that if there happened to be duplicate VariableNames, this would be a subtle bug,
Let vNoOfVariables = FieldValueCount ('VariableName') ;
Better to use
Let vNoOfVariables = NoOfRows ('Application_Variables') ;
-Rob
Thanks! That worked for me!