gdxxrw15.gms : GDXXRW - Testing option dSetText

Description

By default, gdxxrw does not load explanatory text for a dSet. This
can be changed using the option dSetText.

Contributor: Lutz Westermann, January 2020


Small Model of Type : GAMS


Category : GAMS Test library


Main file : gdxxrw15.gms

$title GDXXRW - Testing option dSetText (GDXXRW15,SEQ=810)

$onText
By default, gdxxrw does not load explanatory text for a dSet. This
can be changed using the option dSetText.

Contributor: Lutz Westermann, January 2020
$offText

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

* Reading set with some duplicate records
$call gdxxrw data.xlsx o=d1.gdx MaxDupeErrors=4 set=i cdim=1 set=j rng=a5 rdim=1 trace=0

* Reading dSet with some duplicate records - there should be no explanatory text
$call gdxxrw data.xlsx o=d2.gdx dset=i cdim=1 dset=j rng=a5 rdim=1 trace=0
$call gdxdiff d1.gdx d2.gdx > %system.nullfile%
$ifE errorLevel=0 $abort Data should be different for set and dSet


* Reading dSet with some duplicate records - now there should be explanatory text
$call gdxxrw data.xlsx o=d3.gdx dSetText=Yes dset=i cdim=1 dset=j rng=a5 rdim=1 trace=0
$call gdxdiff d1.gdx d3.gdx > %system.nullfile%
$ifE errorLevel<>0 $abort Data should be the same for set and dSet with dSetText=Yes