GDXXRWExample16.gms : Writing to Spreadsheet adding Text and Hyperlinks

Description

The following example illustrates the use of the Text directive.

First we write some data to a gdx file and we use text directive to write
text to various cells; some of the cells are hyperlinks to other locations.

This model is referenced in "Writing Spreadsheet adding Text and Hyperlinks"
from the GDXXRW Documentation.


Category : GAMS Data Utilities library


Main file : GDXXRWExample16.gms   includes :  GDXXRWExample16.gms

$title Writing Spreadsheet adding Text and Hyperlinks (GDXXRWExample16,SEQ=...)

$onText
The following example illustrates the use of the Text directive.

First we write some data to a gdx file and we use text directive to write
text to various cells; some of the cells are hyperlinks to other locations.

This model is referenced in "Writing Spreadsheet adding Text and Hyperlinks"
from the GDXXRW Documentation.
$offText

$callTool win32.msappavail Excel
$if errorlevel 1 $abort.noError "No Excel available"


Set
   i / i1*i9 /
   j / j1*j9 /;

Parameter A(i,j);
A(i,j) = 10*ord(i) + ord(j);

execute_unload 'pv.gdx';

$onEcho > howToWrite.txt
text="Link to data" rng=Index!A2 linkID=A
text="Below the data for symbol A" rng=data!C2
par=A rng=data!C4
text="Back to index" rng=data!A1 link=Index!A1
text="For more information visit GAMS" rng=data!C1 link=http://www.gams.com
$offEcho

execute 'gdxxrw pv.gdx o=pv.xlsx @howToWrite.txt trace=0'