Page 1 of 1

unable to read and write Excel spreadsheet data in GAMS

Posted: Wed Jul 12, 2017 4:26 pm
by ZNSen
Hi dear all,

I am trying to read an excel sheet in GAMS and create a GDX file from it. But I recieve these error messages :
**** GDX ERROR AT LINE 87
- Open read failed C:\Users\hohn\Documents\gamsdir\projdir\Randomdata.gdx

**** GDX ERROR AT LINE 87 - Msg: No such file or directory
Here is the lines 86 and 87

Code: Select all

[/execute 'gdxxrw.exe i="stochasticopy.xlsx" o=Randomdata.gdx par=Rdata rng=
      "Sheet2"!A1 MaxDupeErrors = <10>  ';]
[code][/ execute_load 'Randomdata.gdx', Rdata;]

Please help me to solve this: Thanks

Re: unable to read and write Excel spreadsheet data in GAMS

Posted: Thu Jul 20, 2017 2:19 pm
by gamsadmin
Hi

Add "Trace = 3" at the end, and you will see if your import of data works well. If there are errors for all imported variables, your gdx file will not be created.

Cheers
Renger

Re: unable to read and write Excel spreadsheet data in GAMS

Posted: Fri Jul 21, 2017 9:29 am
by ZNSen
Ok thanks!

Re: unable to read and write Excel spreadsheet data in GAMS

Posted: Sun Jul 23, 2017 8:13 am
by Meza
Thanks Gams, I did that and no errors appeared.