public class Worksheet
extends java.lang.Object
Example
The following example shows how to freeze panes and insert hyperlink to worksheet with .Net or VB.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.getWorksheets().get(0);
//Freeze panes at "AS40" with 10 rows and 10 columns
sheet.freezePanes("AS40", 10, 10);
//Add a hyperlink in Cell A1
sheet.getHyperlinks().add("A1", 1, 1, "http://www.aspose.com");
| Modifier and Type | Method and Description |
|---|---|
void |
addPageBreaks(java.lang.String cellName)
Adds page break.
|
void |
advancedFilter(boolean isFilter,
java.lang.String listRange,
java.lang.String criteriaRange,
java.lang.String copyTo,
boolean uniqueRecordOnly)
Filters data using complex criteria.
|
void |
autoFitColumn(int columnIndex)
Autofits the column width.
|
void |
autoFitColumn(int columnIndex,
int firstRow,
int lastRow)
Autofits the column width.
|
void |
autoFitColumns()
Autofits all columns in this worksheet.
|
void |
autoFitColumns(AutoFitterOptions options)
Autofits all columns in this worksheet.
|
void |
autoFitColumns(int firstColumn,
int lastColumn)
Autofits the columns width.
|
void |
autoFitColumns(int firstColumn,
int lastColumn,
AutoFitterOptions options)
Autofits the columns width.
|
void |
autoFitColumns(int firstRow,
int firstColumn,
int lastRow,
int lastColumn)
Autofits the columns width.
|
void |
autoFitColumns(int firstRow,
int firstColumn,
int lastRow,
int lastColumn,
AutoFitterOptions options)
Autofits the columns width.
|
void |
autoFitRow(int rowIndex)
Autofits the row height.
|
void |
autoFitRow(int rowIndex,
int firstColumn,
int lastColumn)
Autofits the row height.
|
void |
autoFitRow(int rowIndex,
int firstColumn,
int lastColumn,
AutoFitterOptions options)
Autofits the row height.
|
void |
autoFitRow(int startRow,
int endRow,
int startColumn,
int endColumn)
Autofits row height in a rectangle range.
|
void |
autoFitRows()
Autofits all rows in this worksheet.
|
void |
autoFitRows(AutoFitterOptions options)
Autofits all rows in this worksheet.
|
void |
autoFitRows(boolean onlyAuto)
Autofits all rows in this worksheet.
|
void |
autoFitRows(int startRow,
int endRow)
Autofits row height in a range.
|
void |
autoFitRows(int startRow,
int endRow,
AutoFitterOptions options)
Autofits row height in a range.
|
java.lang.Object[][] |
calculateArrayFormula(java.lang.String formula,
CalculationOptions opts)
Calculates a formula as array formula.
|
java.lang.Object[][] |
calculateArrayFormula(java.lang.String formula,
CalculationOptions opts,
int maxRowCount,
int maxColumnCount)
Calculates a formula as array formula.
|
java.lang.Object[][] |
calculateArrayFormula(java.lang.String formula,
FormulaParseOptions pOpts,
CalculationOptions cOpts,
int baseCellRow,
int baseCellColumn,
int maxRowCount,
int maxColumnCount,
CalculationData calculationData)
Calculates a formula as array formula.
|
void |
calculateFormula(CalculationOptions options,
boolean recursive)
Calculates all formulas in this worksheet.
|
java.lang.Object |
calculateFormula(java.lang.String formula)
Calculates a formula.
|
java.lang.Object |
calculateFormula(java.lang.String formula,
CalculationOptions opts)
Calculates a formula expression directly.
|
java.lang.Object |
calculateFormula(java.lang.String formula,
FormulaParseOptions pOpts,
CalculationOptions cOpts,
int baseCellRow,
int baseCellColumn,
CalculationData calculationData)
Calculates a formula expression directly.
|
void |
clearComments()
Clears all comments in designer spreadsheet.
|
void |
closeAccessCache(int opts)
Closes the session that uses caches to access the data in this worksheet.
|
java.lang.String |
convertFormulaReferenceStyle(java.lang.String formula,
boolean toR1C1,
int baseCellRow,
int baseCellColumn)
Converts the formula reference style.
|
void |
copy(Worksheet sourceSheet)
Copies contents and formats from another worksheet.
|
void |
copy(Worksheet sourceSheet,
CopyOptions copyOptions)
Copies contents and formats from another worksheet.
|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or
resetting unmanaged resources.
|
void |
freezePanes(int row,
int column,
int freezedRows,
int freezedColumns)
Freezes panes at the specified cell in the worksheet.
|
void |
freezePanes(java.lang.String cellName,
int freezedRows,
int freezedColumns)
Freezes panes at the specified cell in the worksheet.
|
java.lang.String |
getActiveCell()
Gets the active cell in the worksheet.
|
AdvancedFilter |
getAdvancedFilter()
Gets the settings of advanced filter.
|
ProtectedRangeCollection |
getAllowEditRanges()
Gets the allow edit range collection in the worksheet.
|
AutoFilter |
getAutoFilter()
Represents auto filter for the specified worksheet.
|
byte[] |
getBackgroundImage()
Gets worksheet background image.
|
Cells |
getCells()
Gets the
Cells collection. |
CellWatchCollection |
getCellWatches()
Gets collection of cells on this worksheet being watched in the 'watch window'.
|
ChartCollection |
getCharts()
Gets a
Chart collection |
CheckBoxCollection |
getCheckBoxes()
Gets a
CheckBox collection. |
java.lang.String |
getCodeName()
Gets worksheet code name.
|
CommentCollection |
getComments()
Gets the
Comment collection. |
ConditionalFormattingCollection |
getConditionalFormattings()
Gets the ConditionalFormattings in the worksheet.
|
CustomPropertyCollection |
getCustomProperties()
Gets an object representing
the identifier information associated with a worksheet.
|
boolean |
getDisplayRightToLeft()
Indicates if the specified worksheet is displayed from right to left instead of from left to right.
|
boolean |
getDisplayZeros()
True if zero values are displayed.
|
ErrorCheckOptionCollection |
getErrorCheckOptions()
Gets error check setting applied on certain ranges.
|
int |
getFirstVisibleColumn()
Represents first visible column index.
|
int |
getFirstVisibleRow()
Represents first visible row index.
|
int[] |
getFreezedPanes()
Gets the freeze panes.
|
Color |
getGridlineColor()
Gets the color of gridline
|
HorizontalPageBreakCollection |
getHorizontalPageBreaks()
Gets the
HorizontalPageBreakCollection collection. |
HyperlinkCollection |
getHyperlinks()
Gets the
HyperlinkCollection collection. |
int |
getIndex()
Gets the index of sheet in the worksheet collection.
|
ListObjectCollection |
getListObjects()
Gets all ListObjects in this worksheet.
|
java.lang.String |
getName()
Gets the name of the worksheet.
|
OleObjectCollection |
getOleObjects()
Represents a collection of
OleObject in a worksheet. |
Outline |
getOutline()
Gets the outline on this worksheet.
|
PageSetup |
getPageSetup()
Represents the page setup description in this sheet.
|
PaneCollection |
getPanes()
Gets the window panes.
|
int |
getPaneState()
Indicates whether the pane has horizontal or vertical splits, and whether those splits are frozen.
|
PictureCollection |
getPictures()
Gets a
Picture collection. |
PivotTableCollection |
getPivotTables()
Gets all pivot tables in this worksheet.
|
CellArea[] |
getPrintingPageBreaks(ImageOrPrintOptions options)
Gets automatic page breaks.
|
Protection |
getProtection()
Represents the various types of protection options available for a worksheet.
|
QueryTableCollection |
getQueryTables()
Gets
QueryTableCollection in the worksheet. |
ScenarioCollection |
getScenarios()
Gets the collection of
Scenario. |
Range[] |
getSelectedAreas()
Gets selected ranges of cells in the designer spreadsheet.
|
java.util.ArrayList |
getSelectedRanges()
Deprecated.
Use Worksheet.GetSelectedAreas() method instead.
|
ShapeCollection |
getShapes()
Returns all drawing shapes in this worksheet.
|
boolean |
getShowFormulas()
Indicates whether to show formulas or their results.
|
SlicerCollection |
getSlicers()
Get the Slicer collection in the worksheet
|
SmartTagSetting |
getSmartTagSetting()
Gets all
SmartTagCollection objects of the worksheet. |
SparklineGroupCollection |
getSparklineGroups()
Gets the sparkline groups in the worksheet.
|
Color |
getTabColor()
Represents worksheet tab color.
|
int |
getTabId()
Specifies the internal identifier for the sheet.
|
TextBoxCollection |
getTextBoxes()
Gets a
TextBox collection. |
TimelineCollection |
getTimelines()
Get the Timeline collection in the worksheet
|
boolean |
getTransitionEntry()
Indicates whether the Transition Formula Entry (Lotus compatibility) option is enabled.
|
boolean |
getTransitionEvaluation()
Indicates whether the Transition Formula Evaluation (Lotus compatibility) option is enabled.
|
int |
getType()
Represents worksheet type.
|
java.lang.String |
getUniqueId()
Gets the unique id, it is same as {15DB5C3C-A5A1-48AF-8F25-3D86AC232D4F}.
|
ValidationCollection |
getValidations()
Gets the data validation setting collection in the worksheet.
|
VerticalPageBreakCollection |
getVerticalPageBreaks()
Gets the
VerticalPageBreakCollection collection. |
int |
getViewType()
Gets the view type.
|
int |
getVisibilityType()
Indicates the visible state for this sheet.
|
Workbook |
getWorkbook()
Gets the workbook object which contains this sheet.
|
int |
getZoom()
Represents the scaling factor in percentage.
|
boolean |
hasAutofilter()
Indicates whether this worksheet has auto filter.
|
boolean |
isGridlinesVisible()
Gets a value indicating whether the gridlines are visible.Default is true.
|
boolean |
isOutlineShown()
Indicates whether to show outline.
|
boolean |
isPageBreakPreview()
Indicates whether the specified worksheet is shown in normal view or page break preview.
|
boolean |
isProtected()
Indicates if the worksheet is protected.
|
boolean |
isRowColumnHeadersVisible()
Gets a value indicating whether the worksheet will display row and column headers.
|
boolean |
isRulerVisible()
Indicates whether the ruler is visible.
|
boolean |
isSelected()
Indicates whether this worksheet is selected when the workbook is opened.
|
boolean |
isVisible()
Represents if the worksheet is visible.
|
void |
moveTo(int index)
Moves the sheet to another location in the spreadsheet.
|
void |
protect(int type)
Protects worksheet.
|
void |
protect(int type,
java.lang.String password,
java.lang.String oldPassword)
Protects worksheet.
|
void |
refreshPivotTables()
Refreshes all the PivotTables in this Worksheet.
|
boolean |
refreshPivotTables(PivotTableRefreshOption option)
Refreshes all the PivotTables in this Worksheet.
|
void |
removeAllDrawingObjects()
Removes all drawing objects in this worksheet.
|
void |
removeAutoFilter()
Removes the auto filter of the worksheet.
|
void |
removeSplit()
Removes split window.
|
int |
replace(java.lang.String oldString,
java.lang.String newString)
Replaces all cells' text with a new string.
|
void |
selectRange(int startRow,
int startColumn,
int totalRows,
int totalColumns,
boolean removeOthers)
Selects a range.
|
void |
setActiveCell(java.lang.String value)
Sets the active cell in the worksheet.
|
void |
setBackgroundImage(byte[] value)
Sets worksheet background image.
|
void |
setCodeName(java.lang.String value)
Gets worksheet code name.
|
void |
setDisplayRightToLeft(boolean value)
Indicates if the specified worksheet is displayed from right to left instead of from left to right.
|
void |
setDisplayZeros(boolean value)
True if zero values are displayed.
|
void |
setFirstVisibleColumn(int value)
Represents first visible column index.
|
void |
setFirstVisibleRow(int value)
Represents first visible row index.
|
void |
setGridlineColor(Color value)
Sets the color of gridline
|
void |
setGridlinesVisible(boolean value)
Sets a value indicating whether the gridlines are visible.Default is true.
|
void |
setName(java.lang.String value)
Sets the name of the worksheet.
|
void |
setOutlineShown(boolean value)
Indicates whether to show outline.
|
void |
setPageBreakPreview(boolean value)
Indicates whether the specified worksheet is shown in normal view or page break preview.
|
void |
setRowColumnHeadersVisible(boolean value)
Sets a value indicating whether the worksheet will display row and column headers.
|
void |
setRulerVisible(boolean value)
Indicates whether the ruler is visible.
|
void |
setSelected(boolean value)
Indicates whether this worksheet is selected when the workbook is opened.
|
void |
setShowFormulas(boolean value)
Indicates whether to show formulas or their results.
|
void |
setTabColor(Color value)
Represents worksheet tab color.
|
void |
setTabId(int value)
Specifies the internal identifier for the sheet.
|
void |
setTransitionEntry(boolean value)
Indicates whether the Transition Formula Entry (Lotus compatibility) option is enabled.
|
void |
setTransitionEvaluation(boolean value)
Indicates whether the Transition Formula Evaluation (Lotus compatibility) option is enabled.
|
void |
setType(int value)
Represents worksheet type.
|
void |
setUniqueId(java.lang.String value)
Sets the unique id, it is same as {15DB5C3C-A5A1-48AF-8F25-3D86AC232D4F}.
|
void |
setViewType(int value)
Sets the view type.
|
void |
setVisibilityType(int value)
Indicates the visible state for this sheet.
|
void |
setVisible(boolean value)
Represents if the worksheet is visible.
|
void |
setVisible(boolean isVisible,
boolean ignoreError)
Sets the visible options.
|
void |
setZoom(int value)
Represents the scaling factor in percentage.
|
void |
split()
Splits window.
|
void |
startAccessCache(int opts)
Starts the session that uses caches to access the data in this worksheet.
|
java.lang.String |
toString()
Returns a string represents the current Worksheet object.
|
void |
unFreezePanes()
Unfreezes panes in the worksheet.
|
void |
unprotect()
Unprotects worksheet.
|
void |
unprotect(java.lang.String password)
Unprotects worksheet.
|
java.util.ArrayList |
xmlMapQuery(java.lang.String path,
XmlMap xmlMap)
Query cell areas that mapped/linked to the specific path of xml map.
|
public void dispose()
public Protection getProtection()
Remarks
This property can protect worksheet in all versions of Excel file and support advanced protection options in ExcelXP and above version.public java.lang.String getUniqueId()
public void setUniqueId(java.lang.String value)
public PaneCollection getPanes()
Remarks
If the window is not split or frozen.public Workbook getWorkbook()
public QueryTableCollection getQueryTables()
QueryTableCollection in the worksheet.public int getType()
See SheetType.
public void setType(int value)
See SheetType.
public java.lang.String getName()
Remarks
The max length of sheet name is 31. And you cannot assign same name(case insensitive) to two worksheets. For example, you cannot set "SheetName1" to the first worksheet and set "SHEETNAME1" to the second worksheet.public void setName(java.lang.String value)
Remarks
The max length of sheet name is 31. And you cannot assign same name(case insensitive) to two worksheets. For example, you cannot set "SheetName1" to the first worksheet and set "SHEETNAME1" to the second worksheet.public boolean getShowFormulas()
public void setShowFormulas(boolean value)
public boolean isGridlinesVisible()
public void setGridlinesVisible(boolean value)
public boolean isRowColumnHeadersVisible()
public void setRowColumnHeadersVisible(boolean value)
public int getPaneState()
See PaneStateType.
public boolean getDisplayZeros()
public void setDisplayZeros(boolean value)
public boolean getDisplayRightToLeft()
public void setDisplayRightToLeft(boolean value)
public boolean isOutlineShown()
public void setOutlineShown(boolean value)
public boolean isSelected()
public void setSelected(boolean value)
public void freezePanes(int row,
int column,
int freezedRows,
int freezedColumns)
Remarks
Row index and column index cannot all be zero. Number of rows and number of columns also cannot all be zero.
The first two parameters specify the froze position and the last two parameters specify the area frozen on the left top pane.
row - Row index.column - Column index.freezedRows - Number of visible rows in top pane, no more than row index.freezedColumns - Number of visible columns in left pane, no more than column index.public int[] getFreezedPanes()
public void split()
public void freezePanes(java.lang.String cellName,
int freezedRows,
int freezedColumns)
Remarks
Row index and column index cannot all be zero. Number of rows and number of columns also cannot all be zero.cellName - Cell name.freezedRows - Number of visible rows in top pane, no more than row index.freezedColumns - Number of visible columns in left pane, no more than column index.public void unFreezePanes()
public void removeSplit()
public PivotTableCollection getPivotTables()
public ListObjectCollection getListObjects()
public int getTabId()
public void setTabId(int value)
public HorizontalPageBreakCollection getHorizontalPageBreaks()
HorizontalPageBreakCollection collection.public VerticalPageBreakCollection getVerticalPageBreaks()
VerticalPageBreakCollection collection.public void addPageBreaks(java.lang.String cellName)
cellName - public HyperlinkCollection getHyperlinks()
HyperlinkCollection collection.public void copy(Worksheet sourceSheet)
sourceSheet - Source worksheet.public void copy(Worksheet sourceSheet, CopyOptions copyOptions)
Remarks
You can copy data from another worksheet in the same file or another file. However, this method does not support to copy drawing objects, such as comments, images and charts.sourceSheet - Source worksheet.copyOptions - public void autoFitColumn(int columnIndex,
int firstRow,
int lastRow)
Remarks
This method autofits a row based on content in a range of cells within the row.columnIndex - Column index.firstRow - First row index.lastRow - Last row index.public void autoFitColumns()
public void autoFitColumns(AutoFitterOptions options)
options - The auto fitting optionspublic void autoFitColumn(int columnIndex)
Remarks
AutoFitColumn is an imprecise function.columnIndex - Column index.public void autoFitColumns(int firstColumn,
int lastColumn)
Remarks
AutoFitColumn is an imprecise function.firstColumn - First column index.lastColumn - Last column index.public void autoFitColumns(int firstColumn,
int lastColumn,
AutoFitterOptions options)
Remarks
AutoFitColumn is an imprecise function.firstColumn - First column index.lastColumn - Last column index.options - The auto fitting optionspublic void autoFitColumns(int firstRow,
int firstColumn,
int lastRow,
int lastColumn)
Remarks
AutoFitColumn is an imprecise function.firstRow - First row index.firstColumn - First column index.lastRow - Last row index.lastColumn - Last column index.public void autoFitColumns(int firstRow,
int firstColumn,
int lastRow,
int lastColumn,
AutoFitterOptions options)
Remarks
AutoFitColumn is an imprecise function.firstRow - First row index.firstColumn - First column index.lastRow - Last row index.lastColumn - Last column index.options - The auto fitting optionspublic void autoFitRow(int rowIndex,
int firstColumn,
int lastColumn)
Remarks
This method autofits a row based on content in a range of cells within the row.rowIndex - Row index.firstColumn - First column index.lastColumn - Last column index.public void autoFitRow(int rowIndex,
int firstColumn,
int lastColumn,
AutoFitterOptions options)
Remarks
This method autofits a row based on content in a range of cells within the row.rowIndex - Row index.firstColumn - First column index.lastColumn - Last column index.options - The auto fitter optionspublic void autoFitRows()
public void autoFitRows(boolean onlyAuto)
onlyAuto - True,only autofits the row height when row height is not customed.public void autoFitRows(AutoFitterOptions options)
options - The auto fitter optionspublic void autoFitRows(int startRow,
int endRow)
startRow - Start row index.endRow - End row index.public void autoFitRows(int startRow,
int endRow,
AutoFitterOptions options)
startRow - Start row index.endRow - End row index.options - The options of auto fitter.public void autoFitRow(int startRow,
int endRow,
int startColumn,
int endColumn)
startRow - Start row index.endRow - End row index.startColumn - Start column index.endColumn - End column index.public void autoFitRow(int rowIndex)
Remarks
AutoFitRow is an imprecise function.rowIndex - Row index.public PageSetup getPageSetup()
public AutoFilter getAutoFilter()
public AdvancedFilter getAdvancedFilter()
public void advancedFilter(boolean isFilter,
java.lang.String listRange,
java.lang.String criteriaRange,
java.lang.String copyTo,
boolean uniqueRecordOnly)
isFilter - Indicates whether filtering the list in place.listRange - The list range.criteriaRange - The criteria range.copyTo - The range where copying data to.uniqueRecordOnly - Only displaying or copying unique rows.public void removeAutoFilter()
public boolean hasAutofilter()
public boolean getTransitionEvaluation()
public void setTransitionEvaluation(boolean value)
public boolean getTransitionEntry()
public void setTransitionEntry(boolean value)
public int getVisibilityType()
See VisibilityType.
public void setVisibilityType(int value)
See VisibilityType.
public void setVisible(boolean isVisible,
boolean ignoreError)
isVisible - Whether the worksheet is visibleignoreError - Whether to ignore error if this option is not valid.public boolean isVisible()
public void setVisible(boolean value)
public void selectRange(int startRow,
int startColumn,
int totalRows,
int totalColumns,
boolean removeOthers)
startRow - The start row.startColumn - The start columntotalRows - The number of rows.totalColumns - The number of columnsremoveOthers - True means removing other selected range and only select this range.public void removeAllDrawingObjects()
public void clearComments()
public SparklineGroupCollection getSparklineGroups()
public ChartCollection getCharts()
Chart collectionpublic CommentCollection getComments()
Comment collection.public PictureCollection getPictures()
Picture collection.public TextBoxCollection getTextBoxes()
TextBox collection.public CheckBoxCollection getCheckBoxes()
CheckBox collection.public OleObjectCollection getOleObjects()
OleObject in a worksheet.public ShapeCollection getShapes()
public SlicerCollection getSlicers()
public TimelineCollection getTimelines()
public void protect(int type)
Remarks
This method protects worksheet without password. It can protect worksheet in all versions of Excel file.type - ProtectionType. Protection type.public void protect(int type,
java.lang.String password,
java.lang.String oldPassword)
Remarks
This method can protect worksheet in all versions of Excel file.Example
//Instantiating a Workbook object
Workbook excel = new Workbook("template.xlsx");
//Accessing the first worksheet in the Excel file
Worksheet worksheet = excel.getWorksheets().get(0);
//Protecting the worksheet with a password
worksheet.protect(ProtectionType.ALL, "aspose", null);
//Saving the modified Excel file in default (that is Excel 20003) format
excel.save("output.xls");
//Closing the file stream to free all resources
type - ProtectionType. Protection type.password - Password.oldPassword - If the worksheet is already protected by a password, please supply the old password.
Otherwise, you can set a null value or blank string to this parameter.public void unprotect()
Remarks
This method unprotects worksheet which is protected without password.public void unprotect(java.lang.String password)
Remarks
If the worksheet is protected without a password, you can set a null value or blank string to password parameter.password - Passwordpublic int getIndex()
public void moveTo(int index)
index - Destination sheet index.public boolean isProtected()
public ValidationCollection getValidations()
public ProtectedRangeCollection getAllowEditRanges()
public ErrorCheckOptionCollection getErrorCheckOptions()
public Outline getOutline()
public int getFirstVisibleRow()
public void setFirstVisibleRow(int value)
public int getFirstVisibleColumn()
public void setFirstVisibleColumn(int value)
public int replace(java.lang.String oldString,
java.lang.String newString)
oldString - Old string value.newString - New string value.public int getZoom()
Remarks
Please set the view type first.public void setZoom(int value)
Remarks
Please set the view type first.public int getViewType()
See ViewType.
public void setViewType(int value)
See ViewType.
public boolean isPageBreakPreview()
public void setPageBreakPreview(boolean value)
public boolean isRulerVisible()
public void setRulerVisible(boolean value)
public java.util.ArrayList getSelectedRanges()
Remarks
NOTE: This method is now obsolete. Instead, please use Worksheet.GetSelectedAreas() method. This property will be removed 12 months later since March 2025. Aspose apologizes for any inconvenience you may have experienced.ArrayList which contains selected ranges.public Range[] getSelectedAreas()
public Color getTabColor()
Remarks
This feature is only supported in ExcelXP(Excel2002) and later versions. If you save file as Excel97 or Excel2000 format, it will be omitted.public void setTabColor(Color value)
Remarks
This feature is only supported in ExcelXP(Excel2002) and later versions. If you save file as Excel97 or Excel2000 format, it will be omitted.public Color getGridlineColor()
public void setGridlineColor(Color value)
public java.lang.String getCodeName()
public void setCodeName(java.lang.String value)
public byte[] getBackgroundImage()
public void setBackgroundImage(byte[] value)
public ConditionalFormattingCollection getConditionalFormattings()
public java.lang.String getActiveCell()
public void setActiveCell(java.lang.String value)
public CustomPropertyCollection getCustomProperties()
Remarks
Worksheet.CustomProperties provide a preferred mechanism for storing arbitrary data. It supports legacy third-party document components, as well as those situations that have a stringent need for binary parts.public CellArea[] getPrintingPageBreaks(ImageOrPrintOptions options)
Remarks
Each cell area represents a paper.options - The print optionspublic SmartTagSetting getSmartTagSetting()
SmartTagCollection objects of the worksheet.public java.lang.String toString()
toString in class java.lang.Objectpublic ScenarioCollection getScenarios()
Scenario.public void startAccessCache(int opts)
Remarks
After finishing the access to the data,Workbook.closeAccessCache(int) should
be invoked with same options to clear all caches and recover normal access mode.opts - AccessCacheOptions. options of data accesspublic void closeAccessCache(int opts)
opts - AccessCacheOptions. options of data accesspublic java.lang.String convertFormulaReferenceStyle(java.lang.String formula,
boolean toR1C1,
int baseCellRow,
int baseCellColumn)
formula - The formula to be converted.toR1C1 - Which reference style to convert the formula to.
If the original formula is of A1 reference style,
then this value should be true so the formula will be converted from A1 to R1C1 reference style;
If the original formula is of R1C1 reference style,
then this value should be false so the formula will be converted from R1C1 to A1 reference style;baseCellRow - The row index of the base cell.baseCellColumn - The column index of the base cell.public java.lang.Object calculateFormula(java.lang.String formula)
formula - Formula to be calculated.public java.lang.Object calculateFormula(java.lang.String formula,
CalculationOptions opts)
Remarks
The formula will be calculated just like it has been set to cell A1. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please usecalculateArrayFormula(String,CalculationOptions) instead.formula - Formula to be calculated.opts - Options for calculating formulaCell.getValue(), or ReferredArea.public java.lang.Object calculateFormula(java.lang.String formula,
FormulaParseOptions pOpts,
CalculationOptions cOpts,
int baseCellRow,
int baseCellColumn,
CalculationData calculationData)
Remarks
The formula will be calculated just like it has been set to the specified base cell. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please usecalculateArrayFormula(String,FormulaParseOptions,CalculationOptions,int,int,int,int,CalculationData) instead.formula - Formula to be calculated.pOpts - Options for parsing formula.cOpts - Options for calculating formula.baseCellRow - The row index of the base cell.baseCellColumn - The column index of the base cell.calculationData - The calculation data. It is used for the situation
that user needs to calculate some static formulas when implementing custom calculation engine.
For such kind of situation, user needs to specify it with the calculation data provided
for AbstractCalculationEngine.calculate(CalculationData).Cell.getValue(), or ReferredArea.public java.lang.Object[][] calculateArrayFormula(java.lang.String formula,
CalculationOptions opts)
formula - Formula to be calculated.opts - Options for calculating formulapublic java.lang.Object[][] calculateArrayFormula(java.lang.String formula,
CalculationOptions opts,
int maxRowCount,
int maxColumnCount)
Remarks
The formula will be taken as dynamic array formula to calculate the dimension and result. User specified maximum dimension is used for cases that the calculated result is large data set (for example, the calculated result may correspond to a whole row or column data) but user does not need so large an array according to business requirement or for performance consideration.formula - Formula to be calculated.opts - Options for calculating formulamaxRowCount - the maximum row count of resultant data.
If it is non-positive or greater than the actual row count, then actual row count will be used.maxColumnCount - the maximum column count of resultant data.
If it is non-positive or greater than the actual row count, then actual column count will be used.public java.lang.Object[][] calculateArrayFormula(java.lang.String formula,
FormulaParseOptions pOpts,
CalculationOptions cOpts,
int baseCellRow,
int baseCellColumn,
int maxRowCount,
int maxColumnCount,
CalculationData calculationData)
Remarks
The formula will be taken as dynamic array formula to calculate the dimension and result. User specified maximum dimension is used for cases that the calculated result is large data set (for example, the calculated result may correspond to a whole row or column data) but user does not need so large an array according to business requirement or for performance consideration.formula - Formula to be calculated.pOpts - Options for parsing formulacOpts - Options for calculating formulabaseCellRow - The row index of the base cell.baseCellColumn - The column index of the base cell.maxRowCount - The maximum row count of resultant data.
If it is non-positive or greater than the actual row count, then actual row count will be used.maxColumnCount - The maximum column count of resultant data.
If it is non-positive or greater than the actual row count, then actual column count will be used.calculationData - The calculation data. It is used for the situation
that user needs to calculate some static formulas when implementing custom calculation engine.
For such kind of situation, user needs to specify it with the calculation data provided
for AbstractCalculationEngine.calculate(CalculationData).public void calculateFormula(CalculationOptions options, boolean recursive)
options - Options for calculationrecursive - True means if the worksheet' cells depend on the cells of other worksheets,
the dependent cells in other worksheets will be calculated too.
False means all the formulas in the worksheet have been calculated and the values are right.public java.util.ArrayList xmlMapQuery(java.lang.String path,
XmlMap xmlMap)
path - xml element pathxmlMap - Specify an xml map if you want to query for the specific path within a specific mapCellArea list that mapped/linked to the specific path of xml map, an empty list is returned if nothing is mapped/linked.public CellWatchCollection getCellWatches()
public void refreshPivotTables()
public boolean refreshPivotTables(PivotTableRefreshOption option)
option - The option for refreshing data source of pivot table.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.