Page 1 of 1

import XLS from multiple rows

Posted: Wed Jun 21, 2006 1:30 pm
by Olger
Hello,

I have a question. I need to import data from excel to vensim. But it's devided in 2 rows (later it will be more if possible) One row is for he input of 2005 and the other row for 2006.

I don't want to paste them into one big row (this would be to long)

Which command do I have to use?

I have included a xls file for example, the 2 columns should be the input for vensim


[Edited on 6-22-2006 by Olger]

Posted: Thu Jun 22, 2006 12:24 pm
by bob@vensim.com
There are a couple of ways to approach this.

The best is probably to write some macros in excel that manipulate the data into a single column.

Alternatively you can read each column as a data variable, then time shift them and add them up. The attached model does this. Note the use of :RAW:. This example does not work if TIME STEP is not 1 since the variable I called "data" is not really data.