Interface SSheet
- All Known Implementing Classes:
AbstractSheetAdv
- Since:
- 3.5.0
- Author:
- dennis
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic final classViewport-shaped description of a single dynamic-array spill range. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCellRegionValueChangeListener(CellRegion cellRegion, SerializableConsumer<CellRegion> listener) Adds the listener when specific cell region value change.default voidaddCellWatch(int row, int col) Adds a cell watch at the specified row and column.addChart(SChart.ChartType type, ViewAnchor anchor) addChart(String name, SChart.ChartType type, ViewAnchor anchor) Add a chart with name, type and anchoraddDataValidation(CellRegion region) addDataValidation(CellRegion region, SDataValidation src) default voidaddIgnoredError(CellRegion range, ErrorCheckType... types) Adds an ignored error for the specified cell region and error check types.voidaddMergedRegion(CellRegion region) Add a merged area, you can't assign a area that overlaps existed merged area.addPicture(int index, ViewAnchor anchor) Add a picture into the sheet with known picture data index.addPicture(SPicture.Format format, byte[] data, ViewAnchor anchor) Add a picture into this sheet with raw picture data and format.default SPivotTableaddPivotTable(String name, CellRegion sourceRange, CellRegion outputLocation) Adds a new pivot table to this sheet.default SProtectedRangeaddProtectedRange(String name, CellRegion range, String password) Adds a protected range to this sheet.default SScenarioaddScenario(String name) Adds a new scenario with the given name.default SSliceraddSlicer(String name, SPivotTable pivot, int fieldIndex) Adds a new slicer to this sheet.voidAdd a new tabledefault SThreadedCommentaddThreadedComment(int row, int col, String text, SThreadedCommentAuthor author) Adds a new root threaded comment at the specified cell.default STimelineaddTimeline(String name, SPivotTable pivot, int fieldIndex) Adds a new timeline to this sheet.default booleancanBulkSetRangeValues(int row1, int col1, int row2, int col2, Object[] values) Bulk-write capability check: returns true if this backend can set the row-majorvaluesinto the rectangle[row1..row2] x [col1..col2]in a single round-trip.voidClear auto filter if there is.voidclearCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx) voidclearCell(CellRegion region) Clear cells in specified regioncreateAutoFilter(CellRegion region) Creates a new auto filter, the old one will be drop directly.voidDelete current autofilter if it hasvoiddeleteCell(int rowIdx, int columnIdx, int lastRowIndex, int lastColumnIndex, boolean horizontal) voiddeleteCell(CellRegion region, boolean horizontal) Delete a region of cells and shift existing cells.voiddeleteChart(SChart chart) voiddeleteColumn(int columnIdx, int lastColumnIdx) delete columns specified by first and last indexvoiddeleteDataValidation(SDataValidation validation) deleteDataValidationRegion(CellRegion region) Delete data validations that are covered by the specified region.voiddeletePicture(SPicture picture) voiddeleteRow(int rowIdx, int lastRowIdx) delete rows specified by first and last indexDeprecated.default List<CellRegion>Returns the list of legacy CSE array regions registered on this sheet.getAttribute(String name) Get the runtime custom attribute that stored in this sheetGet the unmodifiable runtime attributes mapGets the auto filter information if there is.getBook()Get the owner bookgetCell(int rowIdx, int columnIdx) This method always returns not-null cell object.getCellIterator(int row) Deprecated.since 7.0.0 — usegetCseRegion(SCell)for the clearer name.default List<CellRegion>Returns the list of cell watches on this sheet.getChart(int idx) getChartByName(String name) Returns the first chart with specific namegetChartsByName(String name) Returns the charts with specific namegetColumn(int columnIdx) getColumnArray(int columnIdx) Returns the conditional formatting applied to this sheet.getContainsMergedRegions(CellRegion region) Get the merged region that are contained by region.default CellRegiongetCseRegion(SCell cell) Returns the CSE region containing the given cell, ornullif the cell is not in a CSE region.default List<CellRegion>getCseRegionsInViewport(int top, int left, int bottom, int right) Returns every legacy-CSE array region whose extent overlaps the inclusive viewport rectangle, for painting the array outline (theaflrswire field).Returns the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.getDataValidation(int idx) getDataValidation(int row, int column) intintintgetEndCellIndex(int rowIdx) intintdefault List<SFormControl>Returns all form controls on this sheet.shortInternal Use only.getId()default List<SIgnoredError>Returns the list of ignored errors on this sheet.getMergedRegion(int idx) getMergedRegion(int row, int column) getMergedRegion(String cellRefString) intintintintdefault List<SOleObject>Returns all OLE objects on this sheet.intReturns the maximum outline level for column represent.intReturns the maximum outline level for row represent.getOverlapsMergedRegions(CellRegion region, boolean excludeContains) Get the merged region that overlapped the regiongetPicture(int idx) getPicture(String picid) default List<SPivotTable>Returns all pivot tables in this sheet.default List<SProtectedRange>Returns all protected ranges on this sheet.getRangeValues(int row1, int col1, int row2, int col2) Bulk range read: returns the values of every cell in the rectangle[row1..row2] x [col1..col2]as a row-majorList<Object>(blank cells asnull), identical to a per-cellSCell.getValue()walk, in one backend round-trip.getRow(int rowIdx) getRowIterator(int start, int end) Returns the list of scenarios (What-If Analysis) defined on this sheet.Get the sheet nameGets enhanced protection.Get the sheet current visible state.Returns all slicers in this sheet.Returns all SmartArt diagrams on this sheet.default List<SSheet.SpillRangeInfo>getSpillRangesInViewport(int top, int left, int bottom, int right) Returns every dynamic-array spill range whose extent overlaps the inclusive viewport rectangle.intgetStartCellIndex(int rowIdx) intintGet tables in this sheetdefault List<SThreadedComment>Returns all threaded comments (root and replies) on this sheet.Returns all timelines in this sheet.Returns all WordArt objects on this sheet.default booleanIssueK790 / bulk-setValues: whether this sheet has any cell-region value-change listener registered.voidinsertCell(int rowIdx, int columnIdx, int lastRowIndex, int lastColumnIndex, boolean horizontal) voidinsertCell(CellRegion region, boolean horizontal) Insert a region of cells and shift existing cells.voidinsertColumn(int columnIdx, int lastColumnIdx) insert columns specified by first and last indexvoidinsertRow(int rowIdx, int lastRowIdx) insert rows specified by first and last indexbooleanReturns whether to apply the styles in outline.booleanCheck if the sheet is protectedbooleanReturns whether to display outline symbols.booleanReturns whether to display summary below in outline for rows.booleanReturns whether to display summary right in outline for columns.voidmoveCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, int rowOffset, int columnOffset) Move a region of cells specified by 4 indexes.voidmoveCell(CellRegion region, int rowOffset, int columnOffset) Move one or more cells.pasteCell(SheetRegion src, CellRegion dest, PasteOption option) paste cell from src sheet to this sheet, the sheets must in same bookremoveArrayFormula(SCell cell) Deprecated.since 7.0.0 — useremoveCseArrayFormula(SCell)for the clearer name.booleanremoveCellRegionValueChangeListener(CellRegion cellRegion) Remove all cell region value change listeners of specific cell region.booleanRemove the cell region value change listener.default voidremoveCellWatch(int row, int col) Removes a cell watch at the specified row and column.default CellRegionremoveCseArrayFormula(SCell cell) Removes a legacy CSE array formula from this sheet.voidremoveMergedRegion(CellRegion region, boolean removeOverlaps) Remove the merged area that are contained by regiondefault voidremovePivotTable(String name) Removes a pivot table by name.default voidremoveProtectedRange(String name) Removes the protected range with the given name.default voidremoveScenario(String name) Removes the scenario with the given name.default voidremoveSlicer(String name) Removes a slicer by name.voidremoveTable(String tableName) Remove the table of the specified table name.default voidremoveThreadedComment(SThreadedComment comment) Removes a threaded comment and all its replies from this sheet.default voidremoveTimeline(String name) Removes a timeline by name.default SThreadedCommentreplyToComment(SThreadedComment parent, String text, SThreadedCommentAuthor author) Adds a reply to an existing threaded comment.voidsetAlgName(String algName) New way of hashing sheet protection password.voidsetApplyStyles(boolean applyStyles) Sets to apply with the styles in outline.setArrayFormula(String formula, CellRegion region) Deprecated.since 7.0.0 — usesetCseArrayFormula(String, CellRegion)for the clearer name.setAttribute(String name, Object value) Set the runtime custom attribute to stored in this sheet, the attribute is only use for developer to stored runtime data in the sheet, values will not stored to excel when exporting.default CellRegionsetCseArrayFormula(String formula, CellRegion region) Installs a legacy CSE array formula in the specified region.voidsetDefaultColumnWidth(int width) set default column width in pixelsvoidsetDefaultRowHeight(int height) set default row height in pixelsvoidsetHashedPassword(short hashpass) Internal User only.voidsetHashValue(String hashValue) New way of hashing sheet protection password.voidsetOutlineLevelCol(int outlineLevelCol) Sets the maximum outline level for column represent of this sheet.voidsetOutlineLevelRow(int outlineLevelRow) Sets the maximum outline level for row represent of this sheet.voidsetPassword(String password) Sets password to protect sheet, set null to unprotect it.default voidsetRangeValues(int row1, int col1, int row2, int col2, Object[] values) Bulk-writes the row-majorvaluesinto the rectangle in one backend round-trip.voidsetSaltValue(String saltValue) New way of hashing sheet protection password.voidSet the sheet current visible state.voidsetShowOutlineSymbols(boolean showOutlineSymbols) Sets whether to display outline symbols.voidsetSpinCount(String spinCount) New way of hashing sheet protection password.voidsetSummaryBelow(boolean summaryBelow) Sets to display summary below in outline for rows.voidsetSummaryRight(boolean summaryRight) Sets whether to display summary right in outline for columns.voidsetTabColor(String tabColor) Set sheet tab colorsetupColumnArray(int colunmIdx, int lastColumnIdx) Set up a column array, if one array range overlaps another, it throws IllegalStateException.default voidshowScenario(String name) Applies the values from the named scenario to the sheet cells.
-
Method Details
-
getBook
SBook getBook()Get the owner book- Returns:
- the owner book
-
getSheetName
String getSheetName()Get the sheet name- Returns:
- the sheet name
-
getRowIterator
- Returns:
- an iterator of existing rows excluding those blank rows
-
getRowIterator
- Parameters:
start- the start indexend- the end index- Returns:
- an iterator of existing rows excluding those blank rows
- Since:
- 5.0.0
-
getColumnIterator
- Returns:
- an iterator of existing columns excluding those blank columns
-
getColumnArrayIterator
Iterator<SColumnArray> getColumnArrayIterator() -
setupColumnArray
Set up a column array, if one array range overlaps another, it throws IllegalStateException. If you setup a column array that is not continuous, (for example, 0~2, 5~6), then it will create a missing column array automatically to make them continuous.(3~4 in the example). It's required to set up in ascending order of starting column index (min), or it will create unexpectedSColumnArrayfor columns are not continuous.- Parameters:
colunmIdx- index of the starting columnlastColumnIdx- index of the end column- Returns:
- the new created column array
-
getCellIterator
-
getDefaultRowHeight
int getDefaultRowHeight()- Returns:
- default row height in pixels
-
getDefaultColumnWidth
int getDefaultColumnWidth()- Returns:
- default column width in pixels
-
setDefaultRowHeight
void setDefaultRowHeight(int height) set default row height in pixels -
setDefaultColumnWidth
void setDefaultColumnWidth(int width) set default column width in pixels -
getRow
-
getColumnArray
- See Also:
-
getColumn
-
getCell
This method always returns not-null cell object. UseSCell.isNull()to know it's null (blank) or not. -
canBulkSetRangeValues
Bulk-write capability check: returns true if this backend can set the row-majorvaluesinto the rectangle[row1..row2] x [col1..col2]in a single round-trip. The default isfalse(per-cell). The Rust-engine backend returns true only for plain number / string / bool / blank values into a formula-free target range (formula overwrite + special cells keep the per-cell path). -
setRangeValues
Bulk-writes the row-majorvaluesinto the rectangle in one backend round-trip. Only valid whencanBulkSetRangeValues(int, int, int, int, java.lang.Object[])just returned true; dependents of the written cells are marked dirty so referencing formulas recalc. The default is a no-op. -
getRangeValues
Bulk range read: returns the values of every cell in the rectangle[row1..row2] x [col1..col2]as a row-majorList<Object>(blank cells asnull), identical to a per-cellSCell.getValue()walk, in one backend round-trip.Returns
nullwhen this backend has no bulk path; callers (e.g.SRange.getValues()) then fall back to the per-cell visitor. The Rust-engine backend overrides this to issue a single JNI crossing for the whole rectangle, avoiding the per-cell JNI cost on large ranges. -
getCell
- Returns:
- return a cell with specified cell reference, e.g. A2, B3. Area reference, A1:A2, is not acceptable.
- See Also:
-
getId
String getId()- Returns:
- interal sheet object ID
-
getViewInfo
SSheetViewInfo getViewInfo() -
getPrintSetup
SPrintSetup getPrintSetup() -
getStartRowIndex
int getStartRowIndex() -
getEndRowIndex
int getEndRowIndex() -
getStartColumnIndex
int getStartColumnIndex() -
getEndColumnIndex
int getEndColumnIndex() -
getStartCellIndex
int getStartCellIndex(int rowIdx) -
getEndCellIndex
int getEndCellIndex(int rowIdx) -
clearCell
void clearCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx) - See Also:
-
clearCell
Clear cells in specified region -
moveCell
void moveCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, int rowOffset, int columnOffset) Move a region of cells specified by 4 indexes.- See Also:
-
moveCell
Move one or more cells.- Parameters:
region- the region of cells to moverowOffset- positive number to move down, negative to move upcolumnOffset- positive number to move right, negative to move left
-
insertRow
void insertRow(int rowIdx, int lastRowIdx) insert rows specified by first and last index -
deleteRow
void deleteRow(int rowIdx, int lastRowIdx) delete rows specified by first and last index -
insertColumn
void insertColumn(int columnIdx, int lastColumnIdx) insert columns specified by first and last index -
deleteColumn
void deleteColumn(int columnIdx, int lastColumnIdx) delete columns specified by first and last index -
insertCell
void insertCell(int rowIdx, int columnIdx, int lastRowIndex, int lastColumnIndex, boolean horizontal) - See Also:
-
insertCell
Insert a region of cells and shift existing cells.- Parameters:
region- the region of cells to inserthorizontal- TRUE for shifting right, FALSE for shifting down
-
deleteCell
Delete a region of cells and shift existing cells.- Parameters:
region- the region of cells to deletehorizontal- TRUE for shifting left, FALSE for shifting up
-
deleteCell
void deleteCell(int rowIdx, int columnIdx, int lastRowIndex, int lastColumnIndex, boolean horizontal) - See Also:
-
addPicture
Add a picture into this sheet with raw picture data and format.- Parameters:
format- picture format as specified inSPicture.Formatdata- raw byte data of the pictureanchor- where to anchor this picture- Returns:
- the added
SPicture
-
addPicture
Add a picture into the sheet with known picture data index.- Parameters:
index-SPictureDataindexanchor- where to anchor this picture- Returns:
- the
SPictureadded - Since:
- 3.6.0
-
getPicture
-
deletePicture
-
getNumOfPicture
int getNumOfPicture() -
getPicture
-
getPictures
-
addChart
-
getChart
-
deleteChart
-
getNumOfChart
int getNumOfChart() -
getChart
-
getCharts
-
getMergedRegions
List<CellRegion> getMergedRegions() -
removeMergedRegion
Remove the merged area that are contained by region- Parameters:
region-removeOverlaps- true if you want to remove the merged areas that are just overlapped.
-
addMergedRegion
Add a merged area, you can't assign a area that overlaps existed merged area.- Parameters:
region-
-
getNumOfMergedRegion
int getNumOfMergedRegion() -
getMergedRegion
-
getOverlapsMergedRegions
Get the merged region that overlapped the region- Returns:
- the regions that overlaps
-
getContainsMergedRegions
Get the merged region that are contained by region.- Returns:
- the regions that are contained
-
getMergedRegion
-
getMergedRegion
-
addDataValidation
-
addDataValidation
-
getDataValidation
-
deleteDataValidation
-
getNumOfDataValidation
int getNumOfDataValidation() -
getDataValidation
-
getDataValidations
List<SDataValidation> getDataValidations() -
deleteDataValidationRegion
Delete data validations that are covered by the specified region.- Parameters:
region- the cover region- Returns:
- the data validations deleted
- Since:
- 3.6.0
-
getDataValidation
- Parameters:
row-column-- Returns:
- the first data validation at row, column
-
getAttribute
Get the runtime custom attribute that stored in this sheet- Parameters:
name- the attribute name- Returns:
- the value, or null if not found
-
setAttribute
Set the runtime custom attribute to stored in this sheet, the attribute is only use for developer to stored runtime data in the sheet, values will not stored to excel when exporting.- Parameters:
name- name the attribute namevalue- the attribute value
-
getAttributes
Get the unmodifiable runtime attributes map- Returns:
-
isProtected
boolean isProtected()Check if the sheet is protected- Returns:
-
setPassword
Sets password to protect sheet, set null to unprotect it.- Parameters:
password-
-
getHashedPassword
short getHashedPassword()Internal Use only.- Returns:
-
setHashedPassword
void setHashedPassword(short hashpass) Internal User only. -
getAutoFilter
SAutoFilter getAutoFilter()Gets the auto filter information if there is.- Returns:
- the auto filter, or null if not found
-
createAutoFilter
Creates a new auto filter, the old one will be drop directly.- Parameters:
region- the auto filter region- Returns:
- the new auto filter.
-
deleteAutoFilter
void deleteAutoFilter()Delete current autofilter if it has -
clearAutoFilter
void clearAutoFilter()Clear auto filter if there is. -
pasteCell
paste cell from src sheet to this sheet, the sheets must in same book- Parameters:
src- src sheet and it's region to pastedest- destination region in this sheetoption- the copy option- Returns:
- the final effected region
-
getSheetProtection
SSheetProtection getSheetProtection()Gets enhanced protection. -
getSheetVisible
SSheet.SheetVisible getSheetVisible()Get the sheet current visible state.- Since:
- 3.7.0
-
setSheetVisible
Set the sheet current visible state.- Since:
- 3.7.0
-
addTable
Add a new table- Parameters:
table-- Since:
- 3.8.0
-
getTables
Get tables in this sheet- Returns:
- Since:
- 3.8.0
-
removeTable
Remove the table of the specified table name.- Parameters:
tableName-- Since:
- 3.8.0
-
setHashValue
New way of hashing sheet protection password.- Parameters:
hashValue-- Since:
- 3.8.1
-
setSpinCount
New way of hashing sheet protection password.- Parameters:
spinCount-- Since:
- 3.8.1
-
setSaltValue
New way of hashing sheet protection password.- Parameters:
saltValue-- Since:
- 3.8.1
-
setAlgName
New way of hashing sheet protection password.- Parameters:
algName-- Since:
- 3.8.1
-
getConditionalFormattings
List<SConditionalFormatting> getConditionalFormattings()Returns the conditional formatting applied to this sheet.- Returns:
- Since:
- 3.8.2
-
getDataRegion
CellRegion getDataRegion()Returns the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.- Returns:
- the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.
- Since:
- 3.8.3
-
setTabColor
Set sheet tab color- Since:
- 5.2.0
-
getTabColor
String getTabColor()- Returns:
- sheet tab color
- Since:
- 5.2.0
-
setArrayFormula
Deprecated.since 7.0.0 — usesetCseArrayFormula(String, CellRegion)for the clearer name. The legacy method delegates and remains supported indefinitely.Installs a legacy CSE array formula in the specified region.Note if there are shared formulas this will invalidate any formula-evaluator caches based on this workbook.
CSE-only. Dynamic-array (DA) spills are created implicitly by evaluating a DA-aware formula at a single cell — there is no DA-create entry point.
- Parameters:
formula- text representation of the formularegion- Region of array formula for result.- Returns:
- the
CellRegionof cells affected by this change - Since:
- 6.0.0
-
setCseArrayFormula
Installs a legacy CSE array formula in the specified region.- Since:
- 7.0.0
- See Also:
-
removeArrayFormula
Deprecated.since 7.0.0 — useremoveCseArrayFormula(SCell)for the clearer name.Removes a legacy CSE array formula from this sheet. All cells contained in the array range are also cleared.CSE-only. Has no effect on dynamic-array (DA) spills.
- Parameters:
cell- any cell within the CSE array range- Returns:
- the
CellRegionof cells affected by this change - Since:
- 6.0.0
-
removeCseArrayFormula
Removes a legacy CSE array formula from this sheet.- Since:
- 7.0.0
- See Also:
-
getCellRegionInArrayFormula
Deprecated.since 7.0.0 — usegetCseRegion(SCell)for the clearer name.Returns the CSE region containing the given cell, ornullif the cell is not in a CSE region.CSE-only. Does not report dynamic-array (DA) spills.
- Parameters:
cell-- Since:
- 6.0.0
-
getCseRegion
Returns the CSE region containing the given cell, ornullif the cell is not in a CSE region.- Since:
- 7.0.0
- See Also:
-
getAllArrayFormulas
Deprecated.since 7.0.0 — usegetAllCseRegions()for the clearer name.Returns the list of legacy CSE array regions registered on this sheet viasetArrayFormula(String, CellRegion). May miss XLSX-imported CSE regions that live only in the engine core; for a complete viewport-bounded list usegetCseRegionsInViewport(int, int, int, int).- Since:
- 6.0.0
-
getAllCseRegions
Returns the list of legacy CSE array regions registered on this sheet. Same scope asgetAllArrayFormulas().- Since:
- 7.0.0
- See Also:
-
getSpillRangesInViewport
default List<SSheet.SpillRangeInfo> getSpillRangesInViewport(int top, int left, int bottom, int right) Returns every dynamic-array spill range whose extent overlaps the inclusive viewport rectangle. Each entry carries the rectangle and aphantomflag:falsefor a successful spill (Excel paints a thin blue solid border),truefor a blocked#SPILL!spill (Excel paints a dashed border).The default implementation returns an empty list. Engines that track dynamic-array spill ranges (the Rust core) override.
- Since:
- 7.0.0
-
getCseRegionsInViewport
Returns every legacy-CSE array region whose extent overlaps the inclusive viewport rectangle, for painting the array outline (theaflrswire field).The default implementation returns an empty list. The Rust core overrides it, sourcing the regions from the CSE region index so XLSX-imported CSE (which never enters
getAllArrayFormulas()) is covered — symmetric withgetSpillRangesInViewport(int, int, int, int).- Since:
- 7.0.0
-
setOutlineLevelRow
void setOutlineLevelRow(int outlineLevelRow) Sets the maximum outline level for row represent of this sheet.- Parameters:
outlineLevelRow-- Since:
- 6.0.0
-
getOutlineLevelRow
int getOutlineLevelRow()Returns the maximum outline level for row represent.- Since:
- 6.0.0
-
setOutlineLevelCol
void setOutlineLevelCol(int outlineLevelCol) Sets the maximum outline level for column represent of this sheet.- Parameters:
outlineLevelCol-- Since:
- 6.0.0
-
getOutlineLevelCol
int getOutlineLevelCol()Returns the maximum outline level for column represent.- Since:
- 6.0.0
-
isApplyStyles
boolean isApplyStyles()Returns whether to apply the styles in outline.Default:
false- Since:
- 6.0.0
-
setApplyStyles
void setApplyStyles(boolean applyStyles) Sets to apply with the styles in outline.Note: Only used for maintaining model state. (not implemented for UI parts)
- Parameters:
applyStyles- false not to apply- Since:
- 6.0.0
-
isSummaryBelow
boolean isSummaryBelow()Returns whether to display summary below in outline for rows.Default:
true- Since:
- 6.0.0
-
setSummaryBelow
void setSummaryBelow(boolean summaryBelow) Sets to display summary below in outline for rows.Default:
true- Parameters:
summaryBelow- false to display on top.- Since:
- 6.0.0
-
isSummaryRight
boolean isSummaryRight()Returns whether to display summary right in outline for columns.Default:
true- Since:
- 6.0.0
-
setSummaryRight
void setSummaryRight(boolean summaryRight) Sets whether to display summary right in outline for columns.Default:
true- Parameters:
summaryRight- false to display on left.- Since:
- 6.0.0
-
isShowOutlineSymbols
boolean isShowOutlineSymbols()Returns whether to display outline symbols.Default:
true- Since:
- 6.0.0
-
setShowOutlineSymbols
void setShowOutlineSymbols(boolean showOutlineSymbols) Sets whether to display outline symbols.Default:
true- Parameters:
showOutlineSymbols- false not to show.- Since:
- 6.0.0
-
addCellRegionValueChangeListener
void addCellRegionValueChangeListener(CellRegion cellRegion, SerializableConsumer<CellRegion> listener) Adds the listener when specific cell region value change.- Parameters:
cellRegion-listener-- Since:
- 6.2.0
-
hasCellRegionValueChangeListeners
default boolean hasCellRegionValueChangeListeners()IssueK790 / bulk-setValues: whether this sheet has any cell-region value-change listener registered.Range.setValues()disables its bulk fast path when this is true, so each changed cell still fires a per-cell event (the bulk single-region notification cannot reproduce that granularity). Defaultfalse.- Since:
- 7.0.0
-
removeCellRegionValueChangeListener
Remove all cell region value change listeners of specific cell region.- Parameters:
cellRegion-- Returns:
- whether the listeners are removed successfully.
- Since:
- 6.2.0
-
removeCellRegionValueChangeListener
Remove the cell region value change listener.- Parameters:
listener-- Returns:
- whether the listener is removed successfully.
- Since:
- 6.2.0
-
addChart
Add a chart with name, type and anchor- Parameters:
name-type-anchor-- Returns:
- the created chart
- Since:
- 6.2.0
-
getChartByName
Returns the first chart with specific name- Parameters:
name-- Returns:
- the chart with specific name
- Since:
- 6.2.0
-
getChartsByName
Returns the charts with specific name- Parameters:
name-- Returns:
- the charts with specific name
- Since:
- 6.2.0
-
getCellWatches
Returns the list of cell watches on this sheet.- Returns:
- an unmodifiable list of cell regions being watched
- Since:
- 7.0.0
-
addCellWatch
default void addCellWatch(int row, int col) Adds a cell watch at the specified row and column.- Parameters:
row- the row index (0-based)col- the column index (0-based)- Since:
- 7.0.0
-
removeCellWatch
default void removeCellWatch(int row, int col) Removes a cell watch at the specified row and column.- Parameters:
row- the row index (0-based)col- the column index (0-based)- Since:
- 7.0.0
-
getIgnoredErrors
Returns the list of ignored errors on this sheet.- Returns:
- an unmodifiable list of ignored errors
- Since:
- 7.0.0
- See Also:
-
addIgnoredError
Adds an ignored error for the specified cell region and error check types.- Parameters:
range- the cell regiontypes- the error check types to ignore- Since:
- 7.0.0
- See Also:
-
getScenarios
Returns the list of scenarios (What-If Analysis) defined on this sheet.- Returns:
- an unmodifiable list of scenarios
- Since:
- 7.0.0
-
addScenario
Adds a new scenario with the given name.- Parameters:
name- the scenario name (must be unique within the sheet)- Returns:
- the newly created scenario
- Since:
- 7.0.0
-
removeScenario
Removes the scenario with the given name.- Parameters:
name- the scenario name- Since:
- 7.0.0
-
showScenario
Applies the values from the named scenario to the sheet cells. Each input cell in the scenario will have its value set accordingly, triggering formula recalculation.- Parameters:
name- the scenario name- Throws:
IllegalArgumentException- if no scenario with the given name exists- Since:
- 7.0.0
-
getThreadedComments
Returns all threaded comments (root and replies) on this sheet.- Returns:
- an unmodifiable list of threaded comments
- Since:
- 7.0.0
-
addThreadedComment
default SThreadedComment addThreadedComment(int row, int col, String text, SThreadedCommentAuthor author) Adds a new root threaded comment at the specified cell.- Parameters:
row- the row index (0-based)col- the column index (0-based)text- the comment textauthor- the comment author- Returns:
- the newly created threaded comment
- Since:
- 7.0.0
-
replyToComment
default SThreadedComment replyToComment(SThreadedComment parent, String text, SThreadedCommentAuthor author) Adds a reply to an existing threaded comment.- Parameters:
parent- the parent comment to reply totext- the reply textauthor- the reply author- Returns:
- the newly created reply comment
- Since:
- 7.0.0
-
removeThreadedComment
Removes a threaded comment and all its replies from this sheet.- Parameters:
comment- the comment to remove- Since:
- 7.0.0
-
getProtectedRanges
Returns all protected ranges on this sheet.- Returns:
- an unmodifiable list of protected ranges
- Since:
- 7.0.0
-
addProtectedRange
Adds a protected range to this sheet.- Parameters:
name- the range namerange- the cell regionpassword- the password (will be hashed), or null for no password- Returns:
- the newly created protected range
- Since:
- 7.0.0
-
removeProtectedRange
Removes the protected range with the given name.- Parameters:
name- the range name- Since:
- 7.0.0
-
getPivotTables
Returns all pivot tables in this sheet.- Returns:
- an unmodifiable list of pivot tables
- Since:
- 7.0.0
-
addPivotTable
Adds a new pivot table to this sheet.- Parameters:
name- the pivot table namesourceRange- the source data range (on this sheet)outputLocation- the cell region where the pivot table will be placed- Returns:
- the created pivot table
- Since:
- 7.0.0
-
removePivotTable
Removes a pivot table by name.- Parameters:
name- the name of the pivot table to remove- Since:
- 7.0.0
-
getSlicers
Returns all slicers in this sheet.- Returns:
- an unmodifiable list of slicers
- Since:
- 7.0.0
-
addSlicer
Adds a new slicer to this sheet.- Parameters:
name- the slicer namepivot- the pivot table this slicer will filterfieldIndex- the index of the pivot field to filter- Returns:
- the created slicer
- Since:
- 7.0.0
-
removeSlicer
Removes a slicer by name.- Parameters:
name- the name of the slicer to remove- Since:
- 7.0.0
-
getTimelines
Returns all timelines in this sheet.- Returns:
- an unmodifiable list of timelines
- Since:
- 7.0.0
-
addTimeline
Adds a new timeline to this sheet.- Parameters:
name- the timeline namepivot- the pivot table this timeline will filterfieldIndex- the index of the date field to filter- Returns:
- the created timeline
- Since:
- 7.0.0
-
removeTimeline
Removes a timeline by name.- Parameters:
name- the name of the timeline to remove- Since:
- 7.0.0
-
getOleObjects
Returns all OLE objects on this sheet.- Returns:
- an unmodifiable list of OLE objects
- Since:
- 7.0.0
-
getFormControls
Returns all form controls on this sheet.- Returns:
- an unmodifiable list of form controls
- Since:
- 7.0.0
-
getSmartArt
Returns all SmartArt diagrams on this sheet.- Returns:
- an unmodifiable list of SmartArt objects
- Since:
- 7.0.0
-
getWordArt
Returns all WordArt objects on this sheet.- Returns:
- an unmodifiable list of WordArt objects
- Since:
- 7.0.0
-
getAllCseRegions()for the clearer name.