SpawnGAMSExcel.gms : Spawn an arbitrary GAMS model from Excel

Description

This example shows 3 different ways to specify the GAMS System Directory via VBA:
     1) By using the windows registry
     2) By using the "gamside.ini" file that is created when the GAMSIDE is opened
     3) Manually
Notes
     The GAMS model can contain several solve statements.
     The solution is obtained via the VBA code activation of  "trace" command line parameter
     The VBA modules can be exported and used in other programs
     If the Excel Workbook is shared, then GDXXRW can be used to write the solution into the same Workbook

Developed with Visual Basic for Applications 7.0, 3/8/2013.

Contributor: Toni Lastusilta


Category : GAMS Data Utilities library


Main file : SpawnGAMSExcel.gms   includes :  trnsport.gms  SpawnGAMSExcel.gms  SpawnGAMS.xls

$Title  SpawnGAMS: Spawn an arbitrary GAMS model from Excel
$Ontext

This example shows 3 different ways to specify the GAMS System Directory via VBA:
     1) By using the windows registry
     2) By using the "gamside.ini" file that is created when the GAMSIDE is opened
     3) Manually
Notes
     The GAMS model can contain several solve statements.
     The solution is obtained via the VBA code activation of  "trace" command line parameter
     The VBA modules can be exported and used in other programs
     If the Excel Workbook is shared, then GDXXRW can be used to write the solution into the same Workbook

Developed with Visual Basic for Applications 7.0, 3/8/2013.

Contributor: Toni Lastusilta
$Offtext

$if %system.filesys% == UNIX $abort.noerror 'This model cannot run on a non-Windows platform';
$call msappavail -Excel
$if errorlevel 1 $abort.noerror 'Microsoft Excel is not available!';

$call "start SpawnGAMS.xls"