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 defaultly hidden. | ||
method | getLastCell() | |
Gets the last cell in this worksheet. | ||
method | getMaxColumn() | |
Maximum column index of cell which contains data or style. | ||
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 cell which contains data or style. | ||
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. If there are multiple threads to read Row/Cell objects in this collection concurrently, this property should be set as true, otherwise unexpected result may be produced. Supporting Multi-Thread reading may degrade the performance for accessing Row/Cell objects from this collection. | ||
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 | 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. | ||
method | get(index) | |
Gets |
||
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 cell and row objects. | ||
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 | 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 string data in cells 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. | ||
method | deleteBlankRows(options) | |
Delete all blank rows which do not contain any data. | ||
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 | 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 | findFormula(formula, previousCell) | |
Finds the cell with the input string. | ||
method | findFormulaContains(formula, previousCell) | |
Finds the cell with formla which contains the input string. | ||
method | getCell(row, column) | |
Gets the |
||
method | getCellStyle(row, column) | |
Get the style of given cell. | ||
method | getColumn(columnIndex) | |
Gets the |
||
method | getColumnWidth(column) | |
Gets the width of the specified column in normal view | ||
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 | getDependents(isAll, row, column) | |
Get all cells which refer to the 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 | getRow(row) | |
Gets the |
||
method | getRowEnumerator() | |
Gets the rows enumerator | ||
method | getRowHeight(row) | |
Gets the height of a specified row. | ||
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 | getViewColumnWidthPixel(column) | |
Get the width in different view type. | ||
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, spliter, 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(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) | |
Uncollapses 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. |
Property Getters/Setters Detail |
---|
getOdsCellFields : OdsCellFieldCollection | |
OdsCellFieldCollection getOdsCellFields() |
getCount : int | |
int getCount() |
getCountLarge : long | |
long getCountLarge() |
getRows : RowCollection | |
RowCollection getRows() |
getMergedCells : ArrayList | |
ArrayList getMergedCells() |
getMultiThreadReading/setMultiThreadReading : boolean | |
boolean getMultiThreadReading() / setMultiThreadReading(value) |
getMemorySetting/setMemorySetting : int | |
int getMemorySetting() / setMemorySetting(value) |
getStyle/setStyle : Style | |
Style getStyle() / setStyle(value) |
getStandardWidthInch/setStandardWidthInch : float | |
float getStandardWidthInch() / setStandardWidthInch(value) |
getStandardWidthPixels/setStandardWidthPixels : int | |
int getStandardWidthPixels() / setStandardWidthPixels(value) |
getStandardWidth/setStandardWidth : float | |
float getStandardWidth() / setStandardWidth(value) |
getStandardHeight/setStandardHeight : float | |
float getStandardHeight() / setStandardHeight(value) |
getStandardHeightPixels/setStandardHeightPixels : int | |
int getStandardHeightPixels() / setStandardHeightPixels(value) |
getPreserveString/setPreserveString : boolean | |
boolean getPreserveString() / setPreserveString(value) |
getMinRow : int | |
int getMinRow() |
getMaxRow : int | |
int getMaxRow() |
getMinColumn : int | |
int getMinColumn() |
getMaxColumn : int | |
int getMaxColumn() |
getMinDataRow : int | |
int getMinDataRow() |
getMaxDataRow : int | |
int getMaxDataRow() |
getMinDataColumn : int | |
int getMinDataColumn() |
getMaxDataColumn : int | |
int getMaxDataColumn() |
isDefaultRowHeightMatched/setDefaultRowHeightMatched : boolean | |
boolean isDefaultRowHeightMatched() / setDefaultRowHeightMatched(value) |
isDefaultRowHidden/setDefaultRowHidden : boolean | |
boolean isDefaultRowHidden() / setDefaultRowHidden(value) |
getColumns : ColumnCollection | |
ColumnCollection getColumns() |
getRanges : RangeCollection | |
RangeCollection getRanges() |
getLastCell : Cell | |
Cell getLastCell() |
getMaxDisplayRange : Range | |
Range getMaxDisplayRange() |
getFirstCell : Cell | |
Cell getFirstCell() |
get : Cell | |
Cell get(index) |
index
- The zero based index of the element.get : Cell | |
Cell get(row, column) |
row
- Row index.column
- Column index.Example:
excel = Workbook() cells = excel.getWorksheets().get(0).getCells() # Gets the cell at "A1" cell = cells.get(0, 0)
get : Cell | |
Cell get(cellName) |
cellName
- Cell name,including its column letter and row number, for example A5.Example:
excel = Workbook() cells = excel.getWorksheets().get(0).getCells() # Gets the cell at "A1" cell = cells.get("A1")
Method Detail |
---|
findFormula | |
Cell findFormula(formula, previousCell) |
formula: String
- The formula to search for.previousCell: Cell
- Previous cell with the same formula. This parameter can be set to null if searching from the start.findFormulaContains | |
Cell findFormulaContains(formula, previousCell) |
formula: String
- The formula to search for.previousCell: Cell
- Previous cell with the same formula. This parameter can be set to null if searching from the start.find | |
Cell 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.find | |
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 optionsendCellInRow | |
Cell endCellInRow(rowIndex) |
rowIndex: int
- Row index.endCellInColumn | |
Cell endCellInColumn(columnIndex) |
columnIndex: int
- Column index.endCellInColumn | |
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.endCellInRow | |
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 | |
moveRange(sourceArea, destRow, destColumn) |
sourceArea: CellArea
- The range which should be moved.destRow: int
- The dest row.destColumn: int
- The dest column.insertCutCells | |
insertCutCells(cutRange, row, column, shiftType) |
cutRange: Range
- The cut range.row: int
- The row.column: int
- The column.shiftType: int
- A insertRange | |
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 if update references in other worksheets.insertRange | |
insertRange(area, shiftType) |
area: CellArea
- Shift area.shiftType: int
- A insertRange | |
insertRange(area, shiftNumber, shiftType) |
area: CellArea
- Shift area.shiftNumber: int
- Number of rows or columns to be inserted.shiftType: int
- A deleteRange | |
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 retrieveSubtotalSetting | |
SubtotalSetting retrieveSubtotalSetting(ca) |
ca: CellArea
- The rangesubtotal | |
subtotal(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 | |
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 summarry below data.removeFormulas | |
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 | |
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 | |
convertStringToNumericValue() |
getDependents | |
Cell[] getDependents(isAll, row, column) |
isAll: boolean
- Indicates whether check other worksheetsrow: int
- The row index.column: int
- The column index.getCellStyle | |
Style getCellStyle(row, column) |
row: int
- row indexcolumn: int
- columnmerge | |
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 | |
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 | |
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 | |
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)hideRow | |
hideRow(row) |
row: int
- Row index.unhideRow | |
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 | |
hideRows(row, totalRows) |
row: int
- The row index.totalRows: int
- The row number.unhideRows | |
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 | |
setRowHeightPixel(row, pixels) |
row: int
- Row index.pixels: int
- Number of pixels.setRowHeightInch | |
setRowHeightInch(row, inches) |
row: int
- Row index.inches: float
- Number of inches.It should be between 0 and 409.5/72.setRowHeight | |
setRowHeight(row, height) |
row: int
- Row index.height: float
- Height of row.In unit of point It should be between 0 and 409.5.getRowHeight | |
float getRowHeight(row) |
row: int
- Row indexhideColumn | |
hideColumn(column) |
column: int
- Column index.unhideColumn | |
unhideColumn(column, width) |
column: int
- Column index.width: float
- Column width.hideColumns | |
hideColumns(column, totalColumns) |
column: int
- Column index.totalColumns: int
- Column number.unhideColumns | |
unhideColumns(column, totalColumns, width) |
column: int
- Column index.totalColumns: int
- Column numberwidth: float
- Column width.getRowHeightPixel | |
int getRowHeightPixel(row) |
row: int
- Row indexgetRowHeightInch | |
float getRowHeightInch(row) |
row: int
- Row indexsetColumnWidthPixel | |
setColumnWidthPixel(column, pixels) |
column: int
- Column index.pixels: int
- Number of pixels.setColumnWidthInch | |
setColumnWidthInch(column, inches) |
column: int
- Column index.inches: float
- Number of inches.setColumnWidth | |
setColumnWidth(column, width) |
column: int
- Column index.width: float
- Width of column.Column width must be between 0 and 255.getColumnWidthPixel | |
int getColumnWidthPixel(column) |
column: int
- Column indexgetColumnWidthInch | |
float getColumnWidthInch(column) |
column: int
- Column indexgetColumnWidth | |
float getColumnWidth(column) |
column: int
- Column indexgetViewColumnWidthPixel | |
int getViewColumnWidthPixel(column) |
column: int
- The column index.setViewColumnWidthPixel | |
setViewColumnWidthPixel(column, pixels) |
column: int
- The column index.pixels: int
- The width in unit of pixels.getLastDataRow | |
int getLastDataRow(column) |
column: int
- Column index.applyColumnStyle | |
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 | |
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 | |
applyStyle(style, flag) |
style: Style
- The style object which will be applied.flag: StyleFlag
- Flags which indicates applied formatting properties.copyColumns | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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.getGroupedRowOutlineLevel | |
int getGroupedRowOutlineLevel(rowIndex) |
rowIndex: int
- The row index.getGroupedColumnOutlineLevel | |
int getGroupedColumnOutlineLevel(columnIndex) |
columnIndex: int
- The column indexgetMaxGroupedColumnOutlineLevel | |
int getMaxGroupedColumnOutlineLevel() |
getMaxGroupedRowOutlineLevel | |
int getMaxGroupedRowOutlineLevel() |
showGroupDetail | |
showGroupDetail(isVertical, index) |
isVertical: boolean
- True, uncollapse the grouped rows.index: int
- The row/column indexhideGroupDetail | |
hideGroupDetail(isVertical, index) |
isVertical: boolean
- True, collapse the grouped rows.index: int
- The row/column indexungroupColumns | |
ungroupColumns(firstIndex, lastIndex) |
firstIndex: int
- The first column index to be ungrouped.lastIndex: int
- The last column index to be ungrouped.groupColumns | |
groupColumns(firstIndex, lastIndex) |
firstIndex: int
- The first column index to be grouped.lastIndex: int
- The last column index to be grouped.groupColumns | |
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 | |
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 outter group info.ungroupRows | |
ungroupRows(firstIndex, lastIndex) |
firstIndex: int
- The first row index to be ungrouped.lastIndex: int
- The last row index to be ungrouped.groupRows | |
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 columns are hidden.groupRows | |
groupRows(firstIndex, lastIndex) |
firstIndex: int
- The first row index to be grouped.lastIndex: int
- The last row index to be grouped.deleteColumn | |
deleteColumn(columnIndex, updateReference) |
columnIndex: int
- Column index.updateReference: boolean
- Indicates if update references in other worksheets.deleteColumn | |
deleteColumn(columnIndex) |
columnIndex: int
- Column index.deleteColumns | |
deleteColumns(columnIndex, totalColumns, updateReference) |
columnIndex: int
- Column index.totalColumns: int
- Number of columns to be deleted.updateReference: boolean
- Indicates if update references in other worksheets.isDeletingRangeEnabled | |
boolean isDeletingRangeEnabled(startRow, startColumn, totalRows, totalColumns) |
startRow: int
- The start row index of the range.startColumn: int
- The start column idnex of the range.totalRows: int
- The number of the rows in the range.totalColumns: int
- The number of the columns in the range.deleteRows | |
boolean deleteRows(rowIndex, totalRows) |
rowIndex: int
- The first row index to be deleted.totalRows: int
- Number of rows to be deleted.deleteRow | |
deleteRow(rowIndex) |
rowIndex: int
- Row index.deleteRows | |
boolean deleteRows(rowIndex, totalRows, updateReference) |
rowIndex: int
- Row index.totalRows: int
- Number of rows to be deleted.updateReference: boolean
- Indicates if update references in other worksheets.deleteBlankColumns | |
deleteBlankColumns() |
deleteBlankColumns | |
deleteBlankColumns(options) |
options: DeleteOptions
- The options of deleting range.isBlankColumn | |
boolean isBlankColumn(columnIndex) |
columnIndex: int
- the column indexdeleteBlankRows | |
deleteBlankRows() |
deleteBlankRows | |
deleteBlankRows(options) |
options: DeleteOptions
- The options of deleting range.insertColumns | |
insertColumns(columnIndex, totalColumns) |
columnIndex: int
- Column index.totalColumns: int
- The number of columns.insertColumns | |
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 | |
insertColumn(columnIndex, updateReference) |
columnIndex: int
- Column index.updateReference: boolean
- Indicates if references in other worksheets will be updated.insertColumn | |
insertColumn(columnIndex) |
columnIndex: int
- Column index.insertRows | |
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 | |
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 | |
insertRows(rowIndex, totalRows) |
rowIndex: int
- Row index.totalRows: int
- Number of rows to be inserted.insertRow | |
insertRow(rowIndex) |
rowIndex: int
- Row index.clearRange | |
clearRange(range) |
range: CellArea
- Range to be cleared.clearRange | |
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 | |
clearContents(range) |
range: CellArea
- Range to be cleared.clearContents | |
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 | |
clearFormats(range) |
range: CellArea
- Range to be cleared.clearFormats | |
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 | |
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 mapdispose | |
dispose() |
iterator | |
Iterator iterator() |
getRowEnumerator | |
Iterator getRowEnumerator() |
getCell | |
Cell getCell(row, column) |
row: int
- Row indexcolumn: int
- Column indexgetRow | |
Row getRow(row) |
row: int
- Row indexgetColumn | |
Column getColumn(columnIndex) |
columnIndex: int
- The column index.checkCell | |
Cell checkCell(row, column) |
row: int
- Row indexcolumn: int
- Column indexcheckRow | |
Row checkRow(row) |
row: int
- Row indexcheckColumn | |
Column checkColumn(columnIndex) |
columnIndex: int
- The column index.isRowHidden | |
boolean isRowHidden(rowIndex) |
rowIndex: int
- row indexisColumnHidden | |
boolean isColumnHidden(columnIndex) |
columnIndex: int
- column indexaddRange | |
addRange(rangeObject) |
rangeObject: Range
- The range object will be contained in the cellscreateRange | |
Range createRange(upperLeftCell, lowerRightCell) |
upperLeftCell: String
- Upper left cell name.lowerRightCell: String
- Lower right cell name.createRange | |
Range createRange(firstRow, firstColumn, totalRows, totalColumns) |
firstRow: int
- First row of this rangefirstColumn: int
- First column of this rangetotalRows: int
- Number of rowstotalColumns: int
- Number of columnscreateRange | |
Range createRange(address) |
address: String
- The address of the range.createRange | |
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 | |
clear() |
importFormulaArray | |
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 | |
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 | |
importCSV(fileName, spliter, convertNumericData, firstRow, firstColumn) |
fileName: String
- The CSV file name.spliter: String
- The spliterconvertNumericData: 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 | |
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.importCSVFromBytes | |
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 | |
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()