Hi everyone, I have a problem with the output of a result on an excel sheet. In practice I have x (s, i) as a result of the model and I would like me to output them on excel sheet only that I can't. The reason is that they are two indices? I am attaching a photo of the lst result of what to bring to excel.
solve portafoglio1 maximizing z using rmip;
display z.l, x.l;
execute_unload "PortfolioComp.gdx";
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls par=x rng=foglio1!a1 cdim=1 rdim=1 "
it just doesn't create any excel sheets for me. In the compiler it gives me this error message:
*** Keyword does not match symbol type, Symbol: x
Any changes made to the spreadsheet were not saved
could someone help me?
i try like this: Output su excel Topic is solved
Re: Output su excel
Hi RZoro95,
In your GDXXRW-call you are refering to a parameter "x":
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls par=x rng=foglio1!a1 cdim=1 rdim=1 "
However, in your model "x" is declared a a variable, hence the error.
To solve this, change par to var:
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls var=x rng=foglio1!a1 cdim=1 rdim=1 "
Hope this helps.
Regards,
GFA
In your GDXXRW-call you are refering to a parameter "x":
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls par=x rng=foglio1!a1 cdim=1 rdim=1 "
However, in your model "x" is declared a a variable, hence the error.
To solve this, change par to var:
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls var=x rng=foglio1!a1 cdim=1 rdim=1 "
Hope this helps.
Regards,
GFA
Re: Output su excel
Yeah it worked....thanks a lot Mate !!GFA wrote: ↑2 years ago Hi RZoro95,
In your GDXXRW-call you are refering to a parameter "x":
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls par=x rng=foglio1!a1 cdim=1 rdim=1 "
However, in your model "x" is declared a a variable, hence the error.
To solve this, change par to var:
execute "gdxxrw PortfolioComp.gdx o=PorioComp.xls var=x rng=foglio1!a1 cdim=1 rdim=1 "
Hope this helps.
Regards,
GFA
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)