As you can see in the attachment the error I am taking says that there is no such file and it is true. Why there is no Book1.gdx file? Can anybody help me please…
Never call an external program without checking the return code:
$call gdxxrw.exe Book1.xls par=alpha rng=sheet1!A2:B3 ;
$if errorlevel 1 $abort problems with running gdxxrw
* Now continue to load GDX data
$gdxin Book1.gdx
$load alpha
In your case gdxxrw fails and gives the message “Unknown option =” (from your screenshot). Not clear I understand why that is giving your description of the gdxxrw command. The only thing that looks suspicious is the tailing semicolon ‘;’ at the end of the $call gdxxrw line. GAMS statements are terminated by ‘;’ $call is a compile directive (also called dollar control option, https://www.gams.com/latest/docs/UG_DollarControlOptions.html#DOLLARcall) to call an external program at compile time, not a GAMS statement (https://www.gams.com/latest/docs/UG_GAMSPrograms.html#UG_GAMSPrograms_ClassificationOfGAMSStatements). If removing the ‘;’ does not help, post your spreadsheet and the part of your GAMS code that does the Excel reading.
Hello,
I am learning to code in GAMS. I recently came across an issue while linking a gdxrrw file with the code, it is returning this error(placed in attachments along with the corresponding code). I can provide additional information if this is insufficient. Please help me to debug this error. Awaiting a reply.
Thank you in advance.