2

I am currently exporting some data to excel using

execute_unload "file.gdx",data1;
execute 'gdxxrw.exe file.gdx o=excelFile.xlsx par=data1 rng=sheet1! rdim=1 cdim=1';

Which creates a table containing data1's values in excelFile.xlsx in the sheet 'sheet1'. Is there a nice way to export the documental information associated with the parameter data1?

jebob
  • 173
  • 12

1 Answers1

1

one way I found to do this was using the put writing facility. The following example illustrates what you can do in your example.

parameter data1 "text parameter p";
data1 =1;
execute_unload "file.gdx",data1;
file fset / "tmp_text.txt" /;
put fset;
put 'text="',data1.ts,'" rng=sheet1!A1' /;
put 'par=data1 rng=sheet1!A3 rdim=0 cdim=0' /;
putclose fset;
execute 'gdxxrw.exe file.gdx o=excelFile.xlsx @tmp_text.txt';
Jon
  • 351
  • 2
  • 10