Module Spreadsheet/Solver
This module is undocumented. This is a list of its definitions.
EDIT_MODE :: OperationMode
Edit mode: the transaction collects edits made while editing the book, and
they are written to the spreadsheet configuration in the graph.
OPERATION :: OperationMode
Operation mode: the transaction collects edits made while operating the
book. A content edit in such a transaction is written to the active run of
the book instead of its configuration, provided the transaction also
carries the run variable in its context. The transactions started by
syncExec and syncExecGraph do not carry it.
cellName :: Integer -> Integer -> String
cellName row column returns the reference of the cell at the given row
and column, both counted from 0, in the notation where the column is
written as letters and the row number starts at 1. cellName 0 0 is
A1, cellName 2 27 is AB3.
commit :: Transaction -> <Proc> ()
Applies the edits collected in the transaction. The write is scheduled
asynchronously, so this returns before the edits have reached the graph,
and a failure of the write is logged rather than reported here.
editContent :: CellEditor -> String -> Variant -> Maybe Consumer -> <SpreadsheetTransaction> ()
editContent editor location variant callback sets the content of the cell at
location, that is, the same as editProperty_ with the
property content.
editProperty_ :: CellEditor -> String -> String -> Variant -> Maybe Consumer -> <SpreadsheetTransaction> ()
editProperty_ editor location property value consumer sets one property
of one cell. location is a cell reference such as A1, and property is
a client model property name: content for the cell content and
content#expression, font, foreground, background, align,
border, locked, rowSpan and columnSpan for the rest. consumer is
called once the edit has been performed, or may be Nothing.
The edit is added to the transaction in scope and only takes effect when
that transaction commits. A cell that does not yet exist in the sheet
configuration is created. The function editProperty of Spreadsheet/All
wraps this so that the value need not be turned into a Variant by hand.
spreadsheetBookEngine :: SpreadsheetBook -> String -> <Proc> SpreadsheetEngine
spreadsheetBookEngine book name returns the sheet of book that has the
given name. The result is null if the book has no such sheet, which the
signature does not show.
spreadsheetCellColumn :: SpreadsheetCell -> Integer
Returns the column index of the cell, counted from 0, so column A is
column 0.
spreadsheetCellContentVariant :: SpreadsheetCell -> SpreadsheetBook -> <Proc> Maybe Variant
spreadsheetCellContentVariant cell book returns the value of cell
evaluated in book. A formula that still has a cached result is not
recomputed, so the value can be older than the cells it was computed from
until the cell is invalidated. The result is always Just: an empty cell
gives an empty string and an evaluation that throws gives the text of the
exception.
spreadsheetEngineLines :: SpreadsheetEngine -> Integer -> Integer -> <Proc> [SpreadsheetLine]
spreadsheetEngineLines sheet min max returns the rows of sheet whose
row number r satisfies min <= r < max. Rows are numbered from 0, so row
1 of the spreadsheet is row number 0 here. Rows that have no content do not
exist and are simply missing from the result.
spreadsheetLineCells :: SpreadsheetLine -> Integer -> Integer -> <Proc> [SpreadsheetCell]
spreadsheetLineCells row min max returns the cells of row whose column
index c satisfies min <= c < max. Columns are numbered from 0, so
column A is column 0. Empty cells are left out of the result.
spreadsheetLineRow :: SpreadsheetLine -> Integer
Returns the row number of the row, counted from 0, so the row shown as row
1 in the spreadsheet has row number 0.
startTransaction :: CellEditor -> OperationMode -> <Proc> Transaction
startTransaction editor mode opens a new batch for collecting edits made
through editor. The caller is responsible for committing it; syncExec
and syncExecGraph of Spreadsheet/All open and commit one around a
block of edits.
|