ReadMultiDimPar.gms : Reads a multidimensional parameter

Description

This program reads multidimensional parameter using xls2gms.exe.


Category : GAMS Data Utilities library


Main file : ReadMultiDimPar.gms   includes :  ReadMultiDimPar.gms  Yield.xlsx

$onText
   This program reads multidimensional parameter using xls2gms.exe.

   
   The Windows GAMS distribution contains several tools to exchange data with MS-Excel:  
   GDX2XLS, GDXXRW, XLS2GMS, and XLSDUMP. While we continue to include all four tools in our 
   distribution, only GDXXRW is under active development.  Therefore, we strongly recommend 
   using GDXXRW for data exchange with Excel.
$offText

$callTool win32.msappavail Excel
$if errorlevel 1 $abort.noError "No Excel available"

Sets l 'livestock types'       /sheep,goat,angora,cattle,buffalo,mule,poultry/
     cl 'livestk comm'         /meat,milk,wool,hide,egg/
     ty 'time periods - years' / 1974*1979 /;

$onEcho > yield.txt
I=Yield.xlsx
R=data!B2:J23
O=Yield.inc
$offEcho

$call =xls2gms @yield.txt

Table yieldtl(l,cl,ty) livestock "yield" time series (kg per head)
$include Yield.inc
;

display yieldtl;