gdxxrw command not found

Problems with syntax of GAMS
Post Reply
tk1
User
User
Posts: 1
Joined: 3 years ago

gdxxrw command not found

Post by tk1 »

Hi,
I am trying to export a gdx file into an excel file. I am using a Mac OS Catalina. I have the below command:

execute 'gdxxrw filename.gdx o="filename.xls" par=CumCC_REP Rng=ark1!a2 cdim=1';

and get the following error:
sh: gdxxrw: command not found
*** Error at line 292: Execute has nonzero return code RC=127

I am sure that my gdx file exists, but I don't know why GAMS is saying that gdxxrw is not found. How could I fix this?
Thanks and greatly appreciate any help!
Fred
Posts: 373
Joined: 7 years ago

Re: gdxxrw command not found

Post by Fred »

Hi,
GDXXRW is a Windows only tool (see tools/platform matrix). The reason is that the Excel program on the Mac lacks the OLE interface, so the approach gdxxrw uses under windows is not possible on Mac. Workarounds could be to create the GDX under Windows and bring it to the MAC or to export Excel data and then use another tool that works on the MAC (like e.g. csv2gdx).There are also other alternatives (like openpyxl if you are familiar with Python).

I hope this helps!

Fred
Post Reply