ReadFromExcel
Syntax
ReadFromExcel(ExcelFile, Range) or
ReadFromExcel(ExcelFile, Range1, Range2, Range3) or
See also: Specifying Excel File and Range Parameters, ReadFromFile
Summary
Reads in data from an Excel range: typically used for reading in data for time-sliced variables. When reading in time-sliced data the range must contain three vectors of data as follows:
- Years: You do not need to specify values for every year. LEAP interpolate to calculate values for each time slice for any missing year. However, years must be in chronological order.
- Time-slice names: For any single year it is advised (but not required) that you specify values for every time slice defined in LEAP.
- Values corresponding to the time slices in each year.
The data can be arranged either in columns or rows. When using a single range, the data must all be in adjoining cells. When using three named ranges (one for each type of data) each range must have the same orientation and be of equal dimensions. This function can also be used for reading in non-time sliced data in which case only the year and value vectors are required.
Note that to make handling of large amounts of data as fast as possible, LEAP caches the data it reads in this and other Excel related functions in memory. This cache is updated any time you make changes to the data in Excel and then save that data.