Description
This program reads set data using xls2gms.exe.
Category : GAMS Data Utilities library
Main file : ReadSet.gms includes : ReadSet.gms Test3.xlsx
$onText
This program reads set data 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"
set i /
$call =xls2gms r=a1:a3 i=Test3.xlsx o=set1.inc
$include set1.inc
/;
display i;
set j /
$call =xls2gms r=b5:d5 s="," i=Test3.xlsx o=set2.inc
$include set2.inc
/;
display j;