我目前正在使用
将一些数据导出到Excelexecute_unload "file.gdx",data1;
execute 'gdxxrw.exe file.gdx o=excelFile.xlsx par=data1 rng=sheet1! rdim=1 cdim=1';
在表'sheet1'中创建一个包含excelFile.xlsx中data1值的表。 有没有一种很好的方法可以导出与参数data1相关的文档信息?
答案 0 :(得分: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';