Page 1 of 1

3d input from Excel

Posted: Thu May 10, 2007 8:10 pm
by lamalcz
I have an Excel data set that looks like this:

year unit variable1 variable2 variable3 variable4 ...
1990 A 1 2 6 9
1990 B 7 13 12 4
1990 C 1 5 8 0
. . . . . .

1991 A 1 2 6 9
1991 B 7 13 12 4
1991 C 1 5 8 0
. . . . . .

1992 A 1 2 6 9
1992 B 7 13 12 4
1992 C 1 5 8 0
. . . . . .
. . . . . .
. . . . . .

Note the values are not repeated, they are just examples. The years go from 1990 to 2006, there are 87 units and 4 variables.
Can someone suggest the best way to lay this out in Excel and and the code to use for GET XLS DATA?
Thanks.

Posted: Fri May 11, 2007 9:52 am
by bob@vensim.com
The simplest layout would be

Time 1990 1991
var1[a] 1 1
var1 3 4
var2[a] 5 7

and so on. Then you can either use GET XLS DATA or Model>Import Dataset to bring the values into Vensim without difficulty. Note that instead of var1[a] you could have var1 in only cell and a in the next. For GET XLS DATA the labeling does not matter anyway but it does when importing.