Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
First step:
I want to load xls. file and assign every cell value to a variable:
A | B | C | |
1 | 1 | 2 | 3 |
2 | 4 | 5 | 6 |
3 | 7 | 8 | 9 |
The variables should be defined as A1 ... C3.
Second step:
A1...C3 should be stored in a new Field called e.g. Input
I need Input in another qvw.
Third step:
After loading Input in the new qvw. I need the variables A1...C3 again.
Any help please?
Thanks in advance.
Take a look at this script.
***/
Inputs:
CrossTable(InputName,InputValue)
LOAD * inline [
ID,A,B,C
1,1,2,3
2,4,5,6
3,7,8,9
]
;
Store Inputs into Inputs.qvd (qvd); //Use this QVD as source when importing into new app.
//Use input source from row 20... or load the data from Inputs.qvd before looping through the rows generating your variables.
FOR _row = 1 to NoOfRows('Inputs')
LET vVar= peek('InputName', '$(_row)','Inputs')&peek('ID', '$(_row)','Inputs');
LET vVal= peek('InputValue','$(_row)','Inputs');
LET $(vVar) = '$(vVal)';
next
See attached qvw
Take a look at this script.
***/
Inputs:
CrossTable(InputName,InputValue)
LOAD * inline [
ID,A,B,C
1,1,2,3
2,4,5,6
3,7,8,9
]
;
Store Inputs into Inputs.qvd (qvd); //Use this QVD as source when importing into new app.
//Use input source from row 20... or load the data from Inputs.qvd before looping through the rows generating your variables.
FOR _row = 1 to NoOfRows('Inputs')
LET vVar= peek('InputName', '$(_row)','Inputs')&peek('ID', '$(_row)','Inputs');
LET vVal= peek('InputValue','$(_row)','Inputs');
LET $(vVar) = '$(vVal)';
next
See attached qvw