unable to read and write Excel spreadsheet data in GAMS

Problems with syntax of GAMS
ZNSen
User
User
Posts: 9
Joined: 2 months ago

unable to read and write Excel spreadsheet data in GAMS

Postby ZNSen » 2 months ago

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][/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

User avatar
gamsadmin
Site Admin
Site Admin
Posts: 4
Joined: 11 months ago

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

Postby gamsadmin » 2 months ago

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

ZNSen
User
User
Posts: 9
Joined: 2 months ago

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

Postby ZNSen » 2 months ago

Ok thanks!

Meza
User
User
Posts: 1
Joined: 2 months ago

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

Postby Meza » 2 months ago

Thanks Gams, I did that and no errors appeared.


Return to “Syntax”

Who is online

Users browsing this forum: No registered users and 1 guest