GDXXRWExample9.gms : Reads a set using 'values' option from an MS Excel file and writes it to a GDX file

Description

This program illustrates reading a set from an Excel
spreadsheet with using 'values' option.


Category : GAMS Data Utilities library


Main file : GDXXRWExample9.gms   includes :  Test1.xls  GDXXRWExample9.gms

$ontext

This program illustrates reading a set from an Excel
spreadsheet with using 'values' option.
$offtext

$if %system.filesys% == UNIX $abort.noerror 'This model cannot run on a non-Windows platform';
$call msappavail -Excel
$if errorlevel 1 $abort.noerror 'Microsoft Excel is not available!';

 set set1;

$CALL GDXXRW Test1.xls set=SET1 values=yn rng=EX5!A2:B6 Rdim=1 trace=0
$GDXIN Test1.gdx
$LOAD set1
$GDXIN

display set1;

* Data Validation
Set expected_set1 /s1/;
Alias (*,u);
Set error01(u) unexpected elements;
error01(u) = set1(u) xor expected_set1(u);
abort$card(error01) error01;