GDX and GDXXRW

I am having trouble reading a 3 dimensional matrix (data is binary) from Excel using the GDXXRW function. My code is as follows.

Sets
  i RF /RF1*RF276/
  j AL /AL001*AL659/
  k SD /AE1, AE2/
  ;

Parameter
a(i,j,k)
*c(j,k) 
*b(i) 
;


$call GDXXRW GAMSGDX.xlsx para=a  rng=a(ijk)!a1:axs278 maxDupeErrors=4 rdim=1 cdim=2 trace=3
$GDXIN GDX Test.gdx
$LOAD a
$GDXIN

*display a;

Any thoughts would be appreciated.
GDX Test.gms (267 Bytes)
GAMSGDX.xlsx (1 MB)

First just checking the basics, is gdxxrw in your path? If you open a command window and type gdxxrw does it recognise it? If not then this might be your issue.

Assuming it understands the call to gdxxrw, I made a slight adjustment to how the data is read in and it works for me, perhaps just copy what I did. Note that I didn’t use all of your read options, but you can just add those back in. I’m not sure what the exact problem is, I just coded it the way I normally do and it seems to work that way.

Sets
  i RF /RF1*RF276/
  j AL /AL001*AL659/
  k SD /AE1, AE2/
  ;

Parameter
a(i,j,k)
*c(j,k) 
*b(i) 
;

* Below the details about the parameter to read in and the data range has been moved to an external file "excel_dataRead.txt"
$call gdxxrw GAMSGDX.xlsx output=GDXTest.gdx @excel_dataRead.txt trace=3
$GDXIN GDXTest.gdx
$LOAD a
$GDXIN

display a;

Attached below is the file that specifies the parameter to read and the data range within the Excel workbook. You can add as many other sets/parameters to this .txt file as you want, e.g add reads for parameters b and c once you add them to the Excel workbook. Check out the gdxxrw documentation for various options and syntax when using a file to define the data during a gdxxrw read.

Cheers
excel_dataRead.txt (102 Bytes)

Hi
I noticed that you include test.gdx, however, the gdx file that is saved according to your code is the name of the excel file with gdx as extension.
If you want to save the results in test.gdx you should add “o=test.gdx” to your gdxxrw command.
Cheers
Renger