Data Exchange with Microsoft Excel

Problems with syntax of GAMS
Post Reply
richard
User
User
Posts: 27
Joined: 5 years ago

Data Exchange with Microsoft Excel

Post by richard »

Hi
when we want to export parameter from GAMS to excel we write :

$call gdxxrw.exe results.xls par=Level rng=A1:D3


i have a scalar withe name " num_ca" , i want to export this scalar to excel , but h don't know how can i do that .

how can we export scalar from GAMS to excel ?

Best
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Data Exchange with Microsoft Excel

Post by Renger »

Hi Richard
Here an example in execution time:

Code: Select all

scalar b /2/;
execute_unload 'results.gdx', b
execute 'gdxxrw.exe i=results.gdx o=results.xls par=b rng=sheet!A1'
Hope this helps
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
richard
User
User
Posts: 27
Joined: 5 years ago

Re: Data Exchange with Microsoft Excel

Post by richard »

thanks
Post Reply