ReadTrnsportData1.gms : Reads set data and the table of the transportation model in several calls

Description

This program reads transportation data using xls2gms.exe.


Category : GAMS Data Utilities library


Main file : ReadTrnsportData1.gms   includes :  Test3.xlsx  ReadTrnsportData1.gms

$onText
   This program reads transportation 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=Sheet2!a3:a4 i=Test3.xlsx o=seti.inc
$include seti.inc
/;

set j /
$call =xls2gms r=Sheet2!b2:d2 s="," i=Test3.xlsx o=setj.inc
$include setj.inc
/;

table d(i,j)
$call =xls2gms r=Sheet2!a2:d4 i=Test3.xlsx o=pard.inc
$include pard.inc
;

display i,j,d;