Example:
excel = Workbook() cells = excel.getWorksheets().get(0).getCells() # Set default row height cells.setStandardHeight(20) # Set row height cells.setRowHeight(2, 20.5) # Set default colum width cells.setStandardWidth(15) # Set column width cells.setColumnWidth(3, 12.57) # Merge cells cells.merge(5, 4, 2, 2)
Property Getters/Setters Summary | ||
---|---|---|
method | getColumns() | |
Gets the collection of |
||
method | getCount() | |
Gets the total count of instantiated Cell objects.
|
||
method | getCountLarge() | |
Gets the total count of instantiated Cell objects.
|
||
method | getFirstCell() | |
Gets the first cell in this worksheet.
|
||
method | isDefaultRowHeightMatched() | |
method | setDefaultRowHeightMatched(value) | |
Indicates that row height and default font height matches | ||
method | isDefaultRowHidden() | |
method | setDefaultRowHidden(value) | |
Indicates whether the row is default hidden. | ||
method | getLastCell() | |
Gets the last cell in this worksheet.
|
||
method | getMaxColumn() | |
Maximum column index of those cells that have been instantiated in the collection(does not include the column
where style is defined for the whole column but no cell has been instantiated in it).
|
||
method | getMaxDataColumn() | |
Maximum column index of cell which contains data.
|
||
method | getMaxDataRow() | |
Maximum row index of cell which contains data.
|
||
method | getMaxDisplayRange() | |
Gets the max range which includes data, merged cells and shapes.
|
||
method | getMaxRow() | |
Maximum row index of cell which contains data or style.
|
||
method | getMemorySetting() | |
method | setMemorySetting(value) | |
Gets or sets the memory usage option for this cells. The value of the property is MemorySetting integer constant. | ||
method | getMergedCells() | |
Gets the collection of merged cells.
|
||
method | getMinColumn() | |
Minimum column index of those cells that have been instantiated in the collection(does not include the column
where style is defined for the whole column but no cell has been instantiated in it).
|
||
method | getMinDataColumn() | |
Minimum column index of cell which contains data.
|
||
method | getMinDataRow() | |
Minimum row index of cell which contains data.
|
||
method | getMinRow() | |
Minimum row index of cell which contains data or style.
|
||
method | getMultiThreadReading() | |
method | setMultiThreadReading(value) | |
Gets or sets whether the cells data model should support Multi-Thread reading. Default value of this property is false. | ||
method | getOdsCellFields() | |
Gets the list of fields of ods.
|
||
method | getPreserveString() | |
method | setPreserveString(value) | |
Gets or sets a value indicating whether all worksheet values are preserved as strings. Default is false. | ||
method | getRanges() | |
Gets the collection of |
||
method | getRows() | |
Gets the collection of |
||
method | getStandardHeight() | |
method | setStandardHeight(value) | |
Gets or sets the default row height in this worksheet, in unit of points. | ||
method | getStandardHeightInch() | |
method | setStandardHeightInch(value) | |
Gets or sets the default row height in this worksheet, in unit of inches. | ||
method | getStandardHeightPixels() | |
method | setStandardHeightPixels(value) | |
Gets or sets the default row height in this worksheet, in unit of pixels. | ||
method | getStandardWidth() | |
method | setStandardWidth(value) | |
Gets or sets the default column width in the worksheet, in unit of characters. | ||
method | getStandardWidthInch() | |
method | setStandardWidthInch(value) | |
Gets or sets the default column width in the worksheet, in unit of inches. | ||
method | getStandardWidthPixels() | |
method | setStandardWidthPixels(value) | |
Gets or sets the default column width in the worksheet, in unit of pixels. | ||
method | getStyle() | |
method | setStyle(value) | |
Gets and sets the default style of the worksheet. | ||
method | get(row, column) | |
Gets the |
||
method | get(cellName) | |
Gets the |
Method Summary | ||
---|---|---|
method | addRange(rangeObject) | |
Adds a range object reference to cells
|
||
method | applyColumnStyle(column, style, flag) | |
Applies formats for a whole column.
|
||
method | applyRowStyle(row, style, flag) | |
Applies formats for a whole row.
|
||
method | applyStyle(style, flag) | |
Applies formats for a whole worksheet.
|
||
method | checkCell(row, column) | |
Gets the |
||
method | checkColumn(columnIndex) | |
Gets the |
||
method | checkRow(row) | |
Gets the |
||
method | clear() | |
Clears all data of the worksheet.
|
||
method | clearContents(range) | |
Clears contents of a range.
|
||
method | clearContents(startRow, startColumn, endRow, endColumn) | |
Clears contents of a range.
|
||
method | clearFormats(range) | |
Clears formatting of a range.
|
||
method | clearFormats(startRow, startColumn, endRow, endColumn) | |
Clears formatting of a range.
|
||
method | clearMergedCells() | |
Clears all merged ranges.
|
||
method | clearRange(range) | |
Clears contents and formatting of a range.
|
||
method | clearRange(startRow, startColumn, endRow, endColumn) | |
Clears contents and formatting of a range.
|
||
method | convertStringToNumericValue() | |
Converts all string data in the worksheet to numeric value if possible.
|
||
method | copyColumn(sourceCells, sourceColumnIndex, destinationColumnIndex) | |
Copies data and formats of a whole column.
|
||
method | copyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber) | |
Copies data and formats of a whole column.
|
||
method | copyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber, pasteOptions) | |
Copies data and formats of a whole column.
|
||
method | copyColumns(sourceCells, sourceColumnIndex, sourceTotalColumns, destinationColumnIndex, destinationTotalColumns) | |
Copies data and formats of the whole columns.
|
||
method | copyRow(sourceCells, sourceRowIndex, destinationRowIndex) | |
Copies data and formats of a whole row.
|
||
method | copyRows(sourceCells, sourceRowIndex, destinationRowIndex, rowNumber) | |
Copies data and formats of some whole rows.
|
||
method | copyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions) | |
Copies data and formats of some whole rows.
|
||
method | copyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions, pasteOptions) | |
Copies data and formats of some whole rows.
|
||
method | createRange(firstIndex, number, isVertical) | |
Creates a |
||
method | createRange(firstRow, firstColumn, totalRows, totalColumns) | |
Creates a |
||
method | createRange(address) | |
Creates a |
||
method | createRange(upperLeftCell, lowerRightCell) | |
Creates a |
||
method | deleteBlankColumns() | |
Delete all blank columns which do not contain any data.
|
||
method | deleteBlankColumns(options) | |
Delete all blank columns which do not contain any data.
|
||
method | deleteBlankRows() | |
Delete all blank rows which do not contain any data or other object.
|
||
method | deleteBlankRows(options) | |
Delete all blank rows which do not contain any data or other object.
|
||
method | deleteColumn(columnIndex) | |
Deletes a column.
|
||
method | deleteColumn(columnIndex, updateReference) | |
Deletes a column.
|
||
method | deleteColumns(columnIndex, totalColumns, updateReference) | |
Deletes several columns.
|
||
method | deleteRange(startRow, startColumn, endRow, endColumn, shiftType) | |
Deletes a range of cells and shift cells according to the shift option.
|
||
method | deleteRow(rowIndex) | |
Deletes a row.
|
||
method | deleteRow(rowIndex, updateReference) | |
Deletes a row.
|
||
method | deleteRows(rowIndex, totalRows) | |
Deletes several rows.
|
||
method | deleteRows(rowIndex, totalRows, updateReference) | |
Deletes multiple rows in the worksheet.
|
||
method | dispose() | |
Performs application-defined tasks associated with freeing, releasing, or
resetting unmanaged resources.
|
||
method | endCellInColumn(startRow, endRow, startColumn, endColumn) | |
Gets the last cell with maximum column index in this range.
|
||
method | endCellInColumn(columnIndex) | |
Gets the last cell in this column.
|
||
method | endCellInRow(rowIndex) | |
Gets the last cell in this row.
|
||
method | endCellInRow(startRow, endRow, startColumn, endColumn) | |
Gets the last cell with maximum row index in this range.
|
||
method | find(what, previousCell) | |
Finds the cell containing with the input object.
|
||
method | find(what, previousCell, findOptions) | |
Finds the cell containing with the input object.
|
||
method | getCellStyle(row, column) | |
Get the style of given cell.
|
||
method | getColumnOriginalWidthPoint(column) | |
Gets original column's height in unit of point if the column is hidden
|
||
method | getColumnWidth(column) | |
Gets the width(in unit of characters) of the specified column in normal view
|
||
method | getColumnWidth(column, isOriginal, unitType) | |
Gets the column width.
|
||
method | getColumnWidthInch(column) | |
Gets the width of the specified column in normal view, in units of inches.
|
||
method | getColumnWidthPixel(column) | |
Gets the width of the specified column in normal view, in units of pixel.
|
||
method | getColumnWidthPixel(column, original) | |
Gets the width of the specified column in normal view, in units of pixel.
|
||
method | getDependents(isAll, row, column) | |
Get all cells which refer to the specific cell.
|
||
method | getDependentsInCalculation(row, column, recursive) | |
Gets all cells whose calculated result depends on specific cell.
|
||
method | getGroupedColumnOutlineLevel(columnIndex) | |
Gets the outline level (zero-based) of the column.
|
||
method | getGroupedRowOutlineLevel(rowIndex) | |
Gets the outline level (zero-based) of the row.
|
||
method | getLastDataRow(column) | |
Gets the last row index of cell which contains data in the specified column.
|
||
method | getMaxGroupedColumnOutlineLevel() | |
Gets the max grouped column outline level (zero-based).
|
||
method | getMaxGroupedRowOutlineLevel() | |
Gets the max grouped row outline level (zero-based).
|
||
method | getMergedAreas() | |
Gets all merged cells.
|
||
method | getRowEnumerator() | |
Gets the rows enumerator.
|
||
method | getRowHeight(row) | |
Gets the height of a specified row, in unit of points.
|
||
method | getRowHeight(row, isOriginal, unitType) | |
Gets row's height.
|
||
method | getRowHeightInch(row) | |
Gets the height of a specified row in unit of inches.
|
||
method | getRowHeightPixel(row) | |
Gets the height of a specified row in unit of pixel.
|
||
method | getRowOriginalHeightPoint(row) | |
Gets original row's height in unit of point if the row is hidden
|
||
method | getViewColumnWidthPixel(column) | |
Get the width in different view type.
|
||
method | getViewRowHeight(row) | |
Gets the height of a specified row.
|
||
method | getViewRowHeightInch(row) | |
Gets the height of a specified row in unit of inches.
|
||
method | groupColumns(firstIndex, lastIndex) | |
Groups columns.
|
||
method | groupColumns(firstIndex, lastIndex, isHidden) | |
Groups columns.
|
||
method | groupRows(firstIndex, lastIndex) | |
Groups rows.
|
||
method | groupRows(firstIndex, lastIndex, isHidden) | |
Groups rows.
|
||
method | hideColumn(column) | |
Hides a column.
|
||
method | hideColumns(column, totalColumns) | |
Hide multiple columns.
|
||
method | hideGroupDetail(isVertical, index) | |
Collapses the grouped rows/columns.
|
||
method | hideRow(row) | |
Hides a row.
|
||
method | hideRows(row, totalRows) | |
Hides multiple rows.
|
||
method | importCSV(fileName, options, firstRow, firstColumn) | |
Import a CSV file to the cells.
|
||
method | importCSV(fileName, splitter, convertNumericData, firstRow, firstColumn) | |
Import a CSV file to the cells.
|
||
method | importCSVFromBytes(byte_array, firstRow, firstColumn, spliter, convertNumericData) | |
Import a CSV file to the cells.
|
||
method | importCSVFromBytes(byte_array, firstRow, firstColumn, options) | |
Import a CSV file to the cells.
|
||
method | importFormulaArray(stringArray, firstRow, firstColumn, isVertical) | |
Imports an array of formula into a worksheet.
|
||
method | insertColumn(columnIndex) | |
Inserts a new column into the worksheet.
|
||
method | insertColumn(columnIndex, updateReference) | |
Inserts a new column into the worksheet.
|
||
method | insertColumns(columnIndex, totalColumns) | |
Inserts some columns into the worksheet.
|
||
method | insertColumns(columnIndex, totalColumns, updateReference) | |
Inserts some columns into the worksheet.
|
||
method | insertCutCells(cutRange, row, column, shiftType) | |
Insert cut range.
|
||
method | insertRange(area, shiftType) | |
Inserts a range of cells and shift cells according to the shift option.
|
||
method | insertRange(area, shiftNumber, shiftType) | |
Inserts a range of cells and shift cells according to the shift option.
|
||
method | insertRange(area, shiftNumber, shiftType, updateReference) | |
Inserts a range of cells and shift cells according to the shift option.
|
||
method | insertRow(rowIndex) | |
Inserts a new row into the worksheet.
|
||
method | insertRows(rowIndex, totalRows) | |
Inserts multiple rows into the worksheet.
|
||
method | insertRows(rowIndex, totalRows, updateReference) | |
Inserts multiple rows into the worksheet.
|
||
method | insertRows(rowIndex, totalRows, options) | |
Inserts multiple rows into the worksheet.
|
||
method | isBlankColumn(columnIndex) | |
Checks whether given column is blank(does not contain any data).
|
||
method | isColumnHidden(columnIndex) | |
Checks whether a column at given index is hidden.
|
||
method | isDeletingRangeEnabled(startRow, startColumn, totalRows, totalColumns) | |
Check whether the range could be deleted.
|
||
method | isRowHidden(rowIndex) | |
Checks whether a row at given index is hidden.
|
||
method | iterator() | |
Gets the cells enumerator.
|
||
method | linkToXmlMap(mapName, row, column, path) | |
Link to a xml map.
|
||
method | merge(firstRow, firstColumn, totalRows, totalColumns) | |
Merges a specified range of cells into a single cell.
|
||
method | merge(firstRow, firstColumn, totalRows, totalColumns, mergeConflict) | |
Merges a specified range of cells into a single cell.
|
||
method | merge(firstRow, firstColumn, totalRows, totalColumns, checkConflict, mergeConflict) | |
Merges a specified range of cells into a single cell.
|
||
method | moveRange(sourceArea, destRow, destColumn) | |
Moves the range.
|
||
method | removeDuplicates() | |
Removes duplicate rows in the sheet.
|
||
method | removeDuplicates(startRow, startColumn, endRow, endColumn) | |
Removes duplicate values in the range.
|
||
method | removeDuplicates(startRow, startColumn, endRow, endColumn, hasHeaders, columnOffsets) | |
Removes duplicate data of the range.
|
||
method | removeFormulas() | |
Removes all formula and replaces with the value of the formula.
|
||
method | retrieveSubtotalSetting(ca) | |
Retrieves subtotals setting of the range.
|
||
method | setColumnWidth(column, width) | |
Sets the width of the specified column in normal view.
|
||
method | setColumnWidthInch(column, inches) | |
Sets column width in unit of inches in normal view.
|
||
method | setColumnWidthPixel(column, pixels) | |
Sets column width in unit of pixels in normal view.
|
||
method | setRowHeight(row, height) | |
Sets the height of the specified row.
|
||
method | setRowHeightInch(row, inches) | |
Sets row height in unit of inches.
|
||
method | setRowHeightPixel(row, pixels) | |
Sets row height in unit of pixels.
|
||
method | setViewColumnWidthPixel(column, pixels) | |
Sets the width of the column in different view.
|
||
method | showGroupDetail(isVertical, index) | |
Expands the grouped rows/columns.
|
||
method | subtotal(ca, groupBy, function, totalList) | |
Creates subtotals for the range.
|
||
method | subtotal(ca, groupBy, function, totalList, replace, pageBreaks, summaryBelowData) | |
Creates subtotals for the range.
|
||
method | textToColumns(row, column, totalRows, options) | |
Splits the text in the column to columns.
|
||
method | ungroupColumns(firstIndex, lastIndex) | |
Ungroups columns.
|
||
method | ungroupRows(firstIndex, lastIndex) | |
Ungroups rows.
|
||
method | ungroupRows(firstIndex, lastIndex, isAll) | |
Ungroups rows.
|
||
method | unhideColumn(column, width) | |
Unhides a column
|
||
method | unhideColumns(column, totalColumns, width) | |
Unhide multiple columns.
|
||
method | unhideRow(row, height) | |
Unhides a row.
|
||
method | unhideRows(row, totalRows, height) | |
Unhides the hidden rows.
|
||
method | unMerge(firstRow, firstColumn, totalRows, totalColumns) | |
Unmerges a specified range of merged cells.
|
OdsCellFieldCollection getOdsCellFields()
int getCount()
long getCountLarge()
RowCollection getRows()
ArrayList getMergedCells()
boolean getMultiThreadReading() / setMultiThreadReading(value)
int getMemorySetting() / setMemorySetting(value)
Style getStyle() / setStyle(value)
float getStandardWidthInch() / setStandardWidthInch(value)
int getStandardWidthPixels() / setStandardWidthPixels(value)
float getStandardWidth() / setStandardWidth(value)
float getStandardHeight() / setStandardHeight(value)
int getStandardHeightPixels() / setStandardHeightPixels(value)
float getStandardHeightInch() / setStandardHeightInch(value)
boolean getPreserveString() / setPreserveString(value)
int getMinRow()
int getMaxRow()
int getMinColumn()
int getMaxColumn()
int getMinDataRow()
int getMaxDataRow()
int getMinDataColumn()
int getMaxDataColumn()
boolean isDefaultRowHeightMatched() / setDefaultRowHeightMatched(value)
boolean isDefaultRowHidden() / setDefaultRowHidden(value)
ColumnCollection getColumns()
RangeCollection getRanges()
Cell getLastCell()
Range getMaxDisplayRange()
Cell getFirstCell()
deleteRange(startRow, startColumn, endRow, endColumn, shiftType)
startRow: int
- Start row index.startColumn: int
- Start column index.endRow: int
- End row index.endColumn: int
- End column index.shiftType: int
- A SubtotalSetting retrieveSubtotalSetting(ca)
ca: CellArea
- The rangesubtotal(ca, groupBy, function, totalList)
ca: CellArea
- The rangegroupBy: int
- The field to group by, as a zero-based integer offsetfunction: int
- A totalList: Number Array
- An array of zero-based field offsets, indicating the fields to which the subtotals are added.subtotal(ca, groupBy, function, totalList, replace, pageBreaks, summaryBelowData)
ca: CellArea
- The rangegroupBy: int
- The field to group by, as a zero-based integer offsetfunction: int
- A totalList: Number Array
- An array of zero-based field offsets, indicating the fields to which the subtotals are added.replace: boolean
- Indicates whether replace the current subtotalspageBreaks: boolean
- Indicates whether add page break between groupssummaryBelowData: boolean
- Indicates whether add summary below data.removeFormulas()
removeDuplicates()
removeDuplicates(startRow, startColumn, endRow, endColumn)
startRow: int
- The start row.startColumn: int
- The start columnendRow: int
- The end row index.endColumn: int
- The end column index.removeDuplicates(startRow, startColumn, endRow, endColumn, hasHeaders, columnOffsets)
startRow: int
- The start row.startColumn: int
- The start columnendRow: int
- The end row index.endColumn: int
- The end column index.hasHeaders: boolean
- Indicates whether the range contains headers.columnOffsets: Number Array
- The column offsets.convertStringToNumericValue()
Cell[] getDependents(isAll, row, column)
isAll: boolean
- Indicates whether check other worksheetsrow: int
- The row index.column: int
- The column index.Iterator getDependentsInCalculation(row, column, recursive)
row: int
- Row index of the specific cellcolumn: int
- Column index of the specific cell.recursive: boolean
- Whether returns those dependents which do not reference to the specific cell directly
but reference to other leafs of that cell.Style getCellStyle(row, column)
row: int
- row indexcolumn: int
- columnsetViewColumnWidthPixel(column, pixels)
column: int
- The column index.pixels: int
- The width in unit of pixels.int getLastDataRow(column)
column: int
- Column index.applyColumnStyle(column, style, flag)
column: int
- The column index.style: Style
- The style object which will be applied.flag: StyleFlag
- Flags which indicates applied formatting properties.applyRowStyle(row, style, flag)
row: int
- The row index.style: Style
- The style object which will be applied.flag: StyleFlag
- Flags which indicates applied formatting properties.applyStyle(style, flag)
style: Style
- The style object which will be applied.flag: StyleFlag
- Flags which indicates applied formatting properties.copyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber, pasteOptions)
sourceCells0: Cells
- Source Cells object contains data and formats to copy.sourceColumnIndex: int
- Source column index.destinationColumnIndex: int
- Destination column index.columnNumber: int
- The copied column number.pasteOptions: PasteOptions
- the options of pasting.copyColumn(sourceCells, sourceColumnIndex, destinationColumnIndex)
sourceCells: Cells
- Source Cells object contains data and formats to copy.sourceColumnIndex: int
- Source column index.destinationColumnIndex: int
- Destination column index.copyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber)
sourceCells0: Cells
- Source Cells object contains data and formats to copy.sourceColumnIndex: int
- Source column index.destinationColumnIndex: int
- Destination column index.columnNumber: int
- The copied column number.copyColumns(sourceCells, sourceColumnIndex, sourceTotalColumns, destinationColumnIndex, destinationTotalColumns)
sourceCells: Cells
- Source Cells object contains data and formats to copy.sourceColumnIndex: int
- Source column index.sourceTotalColumns: int
- The number of the source columns.destinationColumnIndex: int
- Destination column index.destinationTotalColumns: int
- The number of the destination columns.copyRow(sourceCells, sourceRowIndex, destinationRowIndex)
sourceCells: Cells
- Source Cells object contains data and formats to copy.sourceRowIndex: int
- Source row index.destinationRowIndex: int
- Destination row index.copyRows(sourceCells, sourceRowIndex, destinationRowIndex, rowNumber)
sourceCells: Cells
- Source Cells object contains data and formats to copy.sourceRowIndex: int
- Source row index.destinationRowIndex: int
- Destination row index.rowNumber: int
- The copied row number.copyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions)
sourceCells0: Cells
- Source Cells object contains data and formats to copy.sourceRowIndex: int
- Source row index.destinationRowIndex: int
- Destination row index.rowNumber: int
- The copied row number.copyOptions: CopyOptions
- The copy options.copyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions, pasteOptions)
sourceCells0: Cells
- Source Cells object contains data and formats to copy.sourceRowIndex: int
- Source row index.destinationRowIndex: int
- Destination row index.rowNumber: int
- The copied row number.copyOptions: CopyOptions
- The copy options.pasteOptions: PasteOptions
- the options of pasting.int getGroupedRowOutlineLevel(rowIndex)
rowIndex: int
- The row index.int getGroupedColumnOutlineLevel(columnIndex)
columnIndex: int
- The column indexint getMaxGroupedColumnOutlineLevel()
int getMaxGroupedRowOutlineLevel()
showGroupDetail(isVertical, index)
isVertical: boolean
- True, expands the grouped rows.index: int
- The row/column indexhideGroupDetail(isVertical, index)
isVertical: boolean
- True, collapse the grouped rows.index: int
- The row/column indexungroupColumns(firstIndex, lastIndex)
firstIndex: int
- The first column index to be ungrouped.lastIndex: int
- The last column index to be ungrouped.groupColumns(firstIndex, lastIndex)
firstIndex: int
- The first column index to be grouped.lastIndex: int
- The last column index to be grouped.groupColumns(firstIndex, lastIndex, isHidden)
firstIndex: int
- The first column index to be grouped.lastIndex: int
- The last column index to be grouped.isHidden: boolean
- Specifies if the grouped columns are hidden.ungroupRows(firstIndex, lastIndex, isAll)
firstIndex: int
- The first row index to be ungrouped.lastIndex: int
- The last row index to be ungrouped.isAll: boolean
- True, removes all grouped info.Otherwise, remove the outer group info.ungroupRows(firstIndex, lastIndex)
firstIndex: int
- The first row index to be ungrouped.lastIndex: int
- The last row index to be ungrouped.groupRows(firstIndex, lastIndex, isHidden)
firstIndex: int
- The first row index to be grouped.lastIndex: int
- The last row index to be grouped.isHidden: boolean
- Specifies if the grouped rows are hidden.groupRows(firstIndex, lastIndex)
firstIndex: int
- The first row index to be grouped.lastIndex: int
- The last row index to be grouped.deleteColumn(columnIndex, updateReference)
columnIndex: int
- Index of the column to be deleted.updateReference: boolean
- Indicates whether update references in other worksheets.deleteColumn(columnIndex)
columnIndex: int
- Index of the column to be deleted.deleteColumns(columnIndex, totalColumns, updateReference)
columnIndex: int
- Index of the first column to be deleted.totalColumns: int
- Count of columns to be deleted.updateReference: boolean
- Indicates whether update references in other worksheets.boolean isDeletingRangeEnabled(startRow, startColumn, totalRows, totalColumns)
startRow: int
- The start row index of the range.startColumn: int
- The start column index of the range.totalRows: int
- The number of the rows in the range.totalColumns: int
- The number of the columns in the range.deleteRow(rowIndex)
rowIndex: int
- Index of the row to be deleted.boolean deleteRows(rowIndex, totalRows)
rowIndex: int
- The first row index to be deleted.totalRows: int
- Count of rows to be deleted.deleteRow(rowIndex, updateReference)
rowIndex: int
- Index of the row to be deleted.updateReference: boolean
- Indicates whether update references in other worksheets.boolean deleteRows(rowIndex, totalRows, updateReference)
rowIndex: int
- Index of the first row to be deleted.totalRows: int
- Count of rows to be deleted.updateReference: boolean
- Indicates whether update references in other worksheets.deleteBlankColumns()
deleteBlankColumns(options)
options: DeleteOptions
- The options of deleting range.boolean isBlankColumn(columnIndex)
columnIndex: int
- the column indexdeleteBlankRows()
deleteBlankRows(options)
options: DeleteOptions
- The options of deleting range.insertColumns(columnIndex, totalColumns)
columnIndex: int
- Column index.totalColumns: int
- The number of columns.insertColumns(columnIndex, totalColumns, updateReference)
columnIndex: int
- Column index.totalColumns: int
- The number of columns.updateReference: boolean
- Indicates if references in other worksheets will be updated.insertColumn(columnIndex, updateReference)
columnIndex: int
- Column index.updateReference: boolean
- Indicates if references in other worksheets will be updated.insertColumn(columnIndex)
columnIndex: int
- Column index.insertRows(rowIndex, totalRows, updateReference)
rowIndex: int
- Row index.totalRows: int
- Number of rows to be inserted.updateReference: boolean
- Indicates if references in other worksheets will be updated.insertRows(rowIndex, totalRows, options)
rowIndex: int
- Row index.totalRows: int
- Number of rows to be inserted.options: InsertOptions
- Indicates if references in other worksheets will be updated.insertRows(rowIndex, totalRows)
rowIndex: int
- Row index.totalRows: int
- Number of rows to be inserted.insertRow(rowIndex)
rowIndex: int
- Row index.clearRange(range)
range: CellArea
- Range to be cleared.clearRange(startRow, startColumn, endRow, endColumn)
startRow: int
- Start row index.startColumn: int
- Start column index.endRow: int
- End row index.endColumn: int
- End column index.clearContents(range)
range: CellArea
- Range to be cleared.clearContents(startRow, startColumn, endRow, endColumn)
startRow: int
- Start row index.startColumn: int
- Start column index.endRow: int
- End row index.endColumn: int
- End column index.clearFormats(range)
range: CellArea
- Range to be cleared.clearFormats(startRow, startColumn, endRow, endColumn)
startRow: int
- Start row index.startColumn: int
- Start column index.endRow: int
- End row index.endColumn: int
- End column index.linkToXmlMap(mapName, row, column, path)
mapName: String
- name of xml maprow: int
- row of the destination cellcolumn: int
- column of the destination cellpath: String
- path of xml element in xml mapCell find(what, previousCell)
what: Object
- The object to search for.
The type should be int,double,DateTime,string,bool.
previousCell: Cell
- Previous cell with the same object.
This parameter can be set to null if searching from the start.Cell find(what, previousCell, findOptions)
what: Object
- The object to search for.
The type should be int,double,DateTime,string,bool.
previousCell: Cell
- Previous cell with the same object.
This parameter can be set to null if searching from the start.findOptions: FindOptions
- Find optionsCell endCellInRow(rowIndex)
rowIndex: int
- Row index.Cell endCellInColumn(columnIndex)
columnIndex: int
- Column index.Cell endCellInColumn(startRow, endRow, startColumn, endColumn)
startRow: int
- Start row index.endRow: int
- End row index.startColumn: int
- Start column index.endColumn: int
- End column index.Cell endCellInRow(startRow, endRow, startColumn, endColumn)
startRow: int
- Start row index.endRow: int
- End row index.startColumn: int
- Start column index.endColumn: int
- End column index.moveRange(sourceArea, destRow, destColumn)
sourceArea: CellArea
- The range which should be moved.destRow: int
- The dest row.destColumn: int
- The dest column.insertCutCells(cutRange, row, column, shiftType)
cutRange: Range
- The cut range.row: int
- The row.column: int
- The column.shiftType: int
- A insertRange(area, shiftNumber, shiftType, updateReference)
area: CellArea
- Shift area.shiftNumber: int
- Number of rows or columns to be inserted.shiftType: int
- A updateReference: boolean
- Indicates whether update references in other worksheets.insertRange(area, shiftType)
area: CellArea
- Shift area.shiftType: int
- A insertRange(area, shiftNumber, shiftType)
area: CellArea
- Shift area.shiftNumber: int
- Number of rows or columns to be inserted.shiftType: int
- A dispose()
Iterator iterator()
Iterator getRowEnumerator()
CellArea[] getMergedAreas()
Cell checkCell(row, column)
row: int
- Row indexcolumn: int
- Column indexRow checkRow(row)
Column checkColumn(columnIndex)
columnIndex: int
- The column index.boolean isRowHidden(rowIndex)
rowIndex: int
- row indexboolean isColumnHidden(columnIndex)
columnIndex: int
- column indexaddRange(rangeObject)
rangeObject: Range
- The range object will be contained in the cellsRange createRange(upperLeftCell, lowerRightCell)
Range createRange(firstRow, firstColumn, totalRows, totalColumns)
Range createRange(address)
Range createRange(firstIndex, number, isVertical)
firstIndex: int
- First row index or first column index, zero based.number: int
- Total number of rows or columns, one based.isVertical: boolean
- True - Range created from columns of cells. False - Range created from rows of cells. clear()
importFormulaArray(stringArray, firstRow, firstColumn, isVertical)
stringArray: String[]
- Formula array.firstRow: int
- The row number of the first cell to import in.firstColumn: int
- The column number of the first cell to import in.isVertical: boolean
- Specifies to import data vertically or horizontally.textToColumns(row, column, totalRows, options)
row: int
- The row index.column: int
- The column index.totalRows: int
- The number of rows.options: TxtLoadOptions
- The split options.importCSV(fileName, splitter, convertNumericData, firstRow, firstColumn)
fileName: String
- The CSV file name.splitter: String
- The splitterconvertNumericData: boolean
- Whether the string in text file is converted to numeric data.firstRow: int
- The row number of the first cell to import in.firstColumn: int
- The column number of the first cell to import in.importCSV(fileName, options, firstRow, firstColumn)
fileName: String
- The CSV file name.options: TxtLoadOptions
- The load options for reading text filefirstRow: int
- The row number of the first cell to import in.firstColumn: int
- The column number of the first cell to import in.merge(firstRow, firstColumn, totalRows, totalColumns)
firstRow: int
- First row of this range(zero based)firstColumn: int
- First column of this range(zero based)totalRows: int
- Number of rows(one based)totalColumns: int
- Number of columns(one based)merge(firstRow, firstColumn, totalRows, totalColumns, mergeConflict)
firstRow: int
- First row of this range(zero based)firstColumn: int
- First column of this range(zero based)totalRows: int
- Number of rows(one based)totalColumns: int
- Number of columns(one based)mergeConflict: boolean
- Merge conflict merged ranges.merge(firstRow, firstColumn, totalRows, totalColumns, checkConflict, mergeConflict)
firstRow: int
- First row of this range(zero based)firstColumn: int
- First column of this range(zero based)totalRows: int
- Number of rows(one based)totalColumns: int
- Number of columns(one based)checkConflict: boolean
- Indicates whether check the merged cells intersects other merged cellsmergeConflict: boolean
- Merge conflict merged ranges.unMerge(firstRow, firstColumn, totalRows, totalColumns)
firstRow: int
- First row of this range(zero based)firstColumn: int
- First column of this range(zero based)totalRows: int
- Number of rows(one based)totalColumns: int
- Number of columns(one based)clearMergedCells()
hideRow(row)
row: int
- Row index.unhideRow(row, height)
row: int
- Row index.height: float
- Row height. The row's height will be changed only when the row is hidden and given height value is positive.hideRows(row, totalRows)
row: int
- The row index.totalRows: int
- The row number.unhideRows(row, totalRows, height)
row: int
- The row index.totalRows: int
- The row number.height: float
- Row height. The row's height will be changed only when the row is hidden and given height value is positive.setRowHeightPixel(row, pixels)
row: int
- Row index.pixels: int
- Number of pixels.setRowHeightInch(row, inches)
row: int
- Row index.inches: float
- Number of inches. It should be between 0 and 409.5/72.setRowHeight(row, height)
row: int
- Row index.height: float
- Height of row.In unit of point It should be between 0 and 409.5.float getRowHeight(row, isOriginal, unitType)
row: int
- The row index.isOriginal: boolean
- Whether returns the original row height or 0 for hidden row. unitType: int
- A float getRowOriginalHeightPoint(row)
row: int
- The row index.float getColumnWidth(column, isOriginal, unitType)
column: int
- The column index.isOriginal: boolean
- Indicates whether getting original width.unitType: int
- A float getColumnOriginalWidthPoint(column)
hideColumn(column)
column: int
- Column index.unhideColumn(column, width)
column: int
- Column index.width: float
- Column width.hideColumns(column, totalColumns)
column: int
- Column index.totalColumns: int
- Column number.unhideColumns(column, totalColumns, width)
column: int
- Column index.totalColumns: int
- Column numberwidth: float
- Column width.float getRowHeight(row)
row: int
- Row indexfloat getViewRowHeight(row)
row: int
- Row index.float getRowHeightInch(row)
row: int
- Row indexfloat getViewRowHeightInch(row)
row: int
- Row indexint getRowHeightPixel(row)
row: int
- Row indexsetColumnWidthPixel(column, pixels)
column: int
- Column index.pixels: int
- Number of pixels.setColumnWidthInch(column, inches)
column: int
- Column index.inches: float
- Number of inches.setColumnWidth(column, width)
column: int
- Column index.width: float
- Width of column.Column width must be between 0 and 255.int getColumnWidthPixel(column)
column: int
- Column indexint getColumnWidthPixel(column, original)
column: int
- Column indexoriginal: boolean
- Indicates whether returning original width even when the column is hidden
float getColumnWidthInch(column)
float getColumnWidth(column)
column: int
- Column indexint getViewColumnWidthPixel(column)
column: int
- The column index.importCSVFromBytes(byte_array, firstRow, firstColumn, spliter, convertNumericData)
byte_array: bytes
- The byte arrayfirstRow: int
- The row number of the first cell to import infirstColumn: int
- The column number of the first cell to import inspliter: String
- The spliterconvertNumericData: boolean
- Whether the string in text file is converted to numeric dataExample:
import jpype import asposecells jpype.startJVM() from asposecells.api import * wb = Workbook() cells = wb.getWorksheets().get(0).getCells() with open('EmployeeList.csv', 'rb') as f: cells.importCSVFromBytes(f.read(), 0, 1, spliter=",", convertNumericData=False) wb.save("wb.xlsx") jpype.shutdownJVM()
importCSVFromBytes(byte_array, firstRow, firstColumn, options)
byte_array: bytes
- The byte arrayfirstRow: int
- The row number of the first cell to import infirstColumn: int
- The column number of the first cell to import inoptions: TxtLoadOptions
- The load options for reading text fileExample:
import jpype import asposecells jpype.startJVM() from asposecells.api import * wb = Workbook() cells = wb.getWorksheets().get(0).getCells() loadOptions = TxtLoadOptions() with open('EmployeeList.csv', 'rb') as f: cells.importCSVFromBytes(f.read(), 0, 1, options=loadOptions) wb.save("wb.xlsx") jpype.shutdownJVM()