Excel printing problem

Problems with syntax of GAMS
Post Reply
Luca
User
User
Posts: 13
Joined: 5 months ago

Excel printing problem

Post by Luca » 4 days ago

Dear all users,

I am using GAMS to solve an optimisation problem and I am printing the results to an excel sheet. I wold ask you if there is a way to print in excel all the entries of a variable included the zero entries.

Thanks in advance. Best regards,
Luca

User avatar
Renger
Posts: 186
Joined: 2 years ago

Re: Excel printing problem

Post by Renger » 3 days ago

Hi Luca

The trick is to add the Gams value EPS (a very small number) to your parameter:
myparameter(s) = X.L(s) + EPS;
and then use the GDXXRW option EPSOUT = 0 to change the EPS into 0 when you export them to Excel.

You can find the solution here: https://support.gams.com/gams:export_al ... into_excel.

Cheers
Renger

Luca
User
User
Posts: 13
Joined: 5 months ago

Re: Excel printing problem

Post by Luca » 3 days ago

Thanks very much. Now it works.
Best regards,
Luca

User avatar
Renger
Posts: 186
Joined: 2 years ago

Re: Excel printing problem

Post by Renger » 3 days ago

Just a small clarification:
EPS is not a small value, as I was informed by GAMS. EPS is a stored zero value.
Furthermore: If the dollar control option onEPS is active, zeros in a parameter or table statement are treated as EPS
Cheers
Renger

Post Reply