Description
In this example GAMS runs only in the background. We use the vba version of the GDX API to write a GDX file from data defined in the spreadsheet. To solve the model we call the GAMS executable with a CreateProcess call out of vba.
Category : GAMS Data Utilities library
Main file : Sudoku.gms includes : Sudoku.gms sudoku.xlsm
$Title Sudoku in Excel
$Ontext
In this example GAMS runs only in the background. We use the vba version of the
GDX API to write a GDX file from data defined in the spreadsheet. To solve the
model we call the GAMS executable with a CreateProcess call out of vba.
$Offtext
$if %system.filesys% == UNIX $abort.noerror 'This model cannot run on a non-Windows platform';
$libInclude win32 -c msappavail Excel
$if errorlevel 1 $abort.noerror 'Microsoft Excel is not available!';
$call "start sudoku.xlsm"