- Procedure Spreadsheet::AssignSet(Workbook, Set, Range, Sheet)¶
Spreadsheet::AssignSet writes the elements of an AIMMS
set into the given range of an Excel or OpenOffice Calc workbook.
Spreadsheet::AssignSet( Workbook, ! (input) scalar string expression Set, ! (input) set identifier Range, ! (input) scalar string expression [Sheet] ! (optional) scalar string expression )
A scalar string expression representing the Excel or Calc workbook. If this argument ends in
.ods, OpenOffice Calc is used. Otherwise, Excel is used.
The AIMMS set to be written to the spreadsheet.
A scalar string expression containing the range in the sheet to which the Set should be written.
The sheet to which the Set should be written. Default is the active sheet.
The procedure returns 1 on success, or 0 otherwise. In case of an error the pre-defined AIMMS parameter
CurrentErrorMessagecontains a description of what went wrong.
By calling the procedure
Spreadsheet::SetActiveSheetyou can set the active sheet, after which the optional sheet argument can be omitted in procedures like this one.
A call to this procedure with a specified sheet argument does not change the active sheet, except when the workbook does not have an active sheet yet.
Upto AIMMS 3.11 this function was known as
ExcelAssignSet, which has become deprecated as of AIMMS 3.12.