Package io.keikai.axyra.sheets
Entry points: Workbook (create, open,
save, render), Sheet,
Range (bulk reads and writes) and
Cell. The subpackages hold the option,
style and content types these take and return:
io.keikai.axyra.sheets.io— save, render and streaming-write options, andStreamWorkbookfor large exports.io.keikai.axyra.sheets.style— cell styles, colors and themes.io.keikai.axyra.sheets.content— charts, tables, validations, comments and the other objects a sheet holds.io.keikai.axyra.sheets.calc,io.keikai.axyra.sheets.formula,io.keikai.axyra.sheets.format— calculation mode, user-defined functions, number formatting.io.keikai.axyra.sheets.template— template-marker data binding.
All classes in this package are part of the public API and follow
SemVer compatibility guarantees. Anything under
io.keikai.axyra.sheets.internal is implementation detail and may
change at any time.
Naming conventions
The API uses record-style accessors, not JavaBean getX():
- Property read: the bare property name —
sheet.name(),font.bold(). Stored boolean properties are bare too (style.bold(),validation.allowBlank()). - Derived predicates and state queries use
isX()/hasX()—color.isRgb(),sheet.isProtected(),sheet.isRowHidden(int). The distinction: bare names mirror a stored field;isXanswers a question that is computed or takes arguments. - Mutation:
void setX(...)— setters do not chain. - Coordinates are 0-based, always ordered
(row, col). A1-style references go throughA1. - Collections are returned as
java.util.Listsnapshots; mutating the returned list does not affect the workbook.
Thread safety
A Workbook and every object obtained from it (sheets, ranges,
cells, views) may be used by one thread at a time. Different
Workbook instances run in parallel on different threads; a
long-running export on one workbook does not delay calls on another.
If two threads call into the same workbook at the same time, the engine
refuses the second call: it throws
AxyraException with the message "workbook is
already in use". It does not wait. This refusal protects the engine's
memory; it is not a lock to rely on, because the Java side keeps per-workbook
state that is not synchronized. A cross-workbook call such as
Workbook.copySheetFrom uses both workbooks and is refused the same
way when either is busy. Synchronize externally when several threads share
one workbook. Methods that make several engine calls, and
read-modify-write sequences, are not atomic.
A user-defined function (Workbook.registerFunction) runs inside
the recalculation of its workbook. A call from the function back into that
workbook fails the same way.
The license state (License) is shared by
every workbook in the process and is safe to read and set from any thread.
Exceptions
IllegalArgumentException/IndexOutOfBoundsException— caller errors (invalid references, out-of-range indices), detected before touching the document.IllegalStateException— a call on a closed workbook, or on a view of it or of a deleted sheet.AxyraException— engine and document errors, a busy workbook (see above), and a reached evaluation limit;AxyraIoExceptionfor import/export failures andAxyraFormulaExceptionfor formula parse/evaluation errors. Both are subclasses ofAxyraException.
Some engine checks surface as AxyraException rather than
IndexOutOfBoundsException; each method's @throws names the
exception it throws.
-
ClassDescriptionAggregate function for a pivot table data (values) field.Base type for engine and API failures surfaced from the native layer.A formula the API cannot accept: for example a syntactically invalid formula passed to
Range.setFormula(java.lang.String)orCell.setFormula(java.lang.String).A file I/O or file-format failure: for example a missing file, an unsupported format, or a malformed workbook that cannot be read or written.One cell of a sheet: a lightweight(sheet, row, column)view, 0-based, that holds no native resource.A workbook-wide cell coordinate: a 0-based sheet index plus 0-based row and column.One cell's value: a number, text, boolean, error or blank, or a matrix passed to and from a user-defined function.A rectangular, row-major matrix of scalar values (rows[r][c]).The empty cell value; use the sharedCellValue.BLANK.A boolean cell value.An error cell value, identified by its ExcelERROR.TYPEcode (seeCellValue.error(int)for the codes).A numeric cell value.A text cell value.A view of one existing chart, obtained withSheet.chart(int)for a chart on a worksheet, or withWorkbook.chartSheetChart(int)for the chart of a chart-sheet tab.Aggregation function forSheet.consolidate(int, int, io.keikai.axyra.sheets.ConsolidateFunction, io.keikai.axyra.sheets.Range...).A custom document property — one entry of the workbook's custom file properties part (docProps/custom.xml, ECMA-376 Part 1 §22.3).A boolean value (vt:bool).A date value (vt:filetime).A numeric value.Fidelity view of a variant type outside the modeled set (for examplevt:cycurrency):vtTypeis the original element name andvalueits text, both preserved verbatim in the file across open and save.A text value (vt:lpwstr).The typed value of a custom document property.One date grouping item of a date auto-filter (ECMA-376 §18.3.2.4dateGroupItem, §18.18.24ST_DateTimeGrouping): selects every date/time cell inside the period named bygrouping.Dynamic auto-filter kind (ECMA-376 §18.18.26 ST_DynamicFilterType).Comparison operator for a custom auto-filter condition.A style predicate for format-restricted find/replace (Excel's Find & Replace → Format...Options forSheet.importData(int, int, java.util.List, ImportOptions), which writes a list of Java objects onto a sheet, one object per row and one property per column.Fluent builder forImportOptions.Process-global licensing facade.A snapshot of the engine's licensing status.WhatWorkbook.setLicense(String, LicenseMode)does with a token that is not in force.The runtime licensing status of the engine (process-global).A defined name (named range).The six page margins of a sheet, in inches (Excel semantics; ECMA-376 Part 1 §18.3.1.62pageMargins).A pivot calculated-field definition: a virtual source column computed from a formula over the other source columns (ECMA-376 Part 1 §18.10.1.13cacheField@formula).A pivot calculated-item definition: a virtual item of a row/column field computed from the field's other items (ECMA-376 Part 1 §18.10.1.9calculatedItem).Date component a pivot row/column field is grouped by (ECMA-376 Part 1 §18.10.1.81rangePr@groupBy).One placed pivot field, as returned by thePivotTableViewarea read-backs (rowFields(),columnFields(),dataFields(),filterFields()).The grouping of a pivot row/column field, read back viaPivotTableView.fieldGroup(String): either a date-component grouping (PivotFieldGroup.dateBy()non-null) or numeric range bins.The declared sort of a pivot row/column field, read back viaPivotTableView.fieldSort(String).A caption (label) filter on a pivot row/column field, read back viaPivotTableView.labelFilter(String).Caption (label) filter condition for a pivot row/column field — Excel's "Label Filters" menu (ECMA-376 Part 1 §18.18.72ST_PivotFilterType, caption subset).Report layout of a pivot table (ECMA-376 Part 1 §18.10.1.73 — thecompact/outline/compactDataattribute trio).The Show-Values-As state of a pivot values-area field, read back viaPivotTableView.showDataAs(int).Show-Values-As display mode for a pivot values-area field — Excel's "Show Values As" menu (ECMA-376 Part 1 §18.10.1.18dataField@showDataAs).A named pivot-table style plus banding flags (<pivotTableStyleInfo>— ECMA-376 Part 1 §18.10.1.88), read back viaPivotTableView.style().A view of one pivot table: its definition (fields, filters, sorts, layout, style) and thePivotTableView.refresh()that writes its output into the sheet.The Top-N ("Top 10") filter of a pivot row/column field, read back viaPivotTableView.topNFilter(String): items rank by their aggregate of a values-area entry and only the top (or bottom)valueitems / percent survive a refresh.A value filter on a pivot row/column field, read back viaPivotTableView.valueFilter(String).Value filter condition for a pivot row/column field — Excel's "Value Filters" menu (ECMA-376 Part 1 §18.18.72ST_PivotFilterType, value subset).A rectangle of cells on one sheet: the bulk API.A worksheet: a lightweight view bound to one tab of aWorkbook.Sheet protection options — the checkboxes of Excel's "Protect Sheet" dialog.Builder forSheetProtection; every setter takestrue= allowed.What kind of tab aSheetis.Direction that surrounding cells move when inserting or deleting a cell range.Validation report for one package digital signature — an OPC (ECMA-376 Part 2 §13) XML signature found in the workbook file when it was opened.Verification outcome of a package signature.One sort key: a 0-based range-relative index and its direction, optionally carrying a custom ordering list (Excel's "Custom Lists").Aggregate function forSheet.subtotal(int, int, int, io.keikai.axyra.sheets.SubtotalFunction, int...), by ExcelSUBTOTALcode.Table totals-row aggregation (ECMA-376 §18.18.92 ST_TotalsRowFunction).A sheet's three-state visibility.A spreadsheet workbook: the top-level container of sheets and the owner of the native engine workbook.