aspose.cells

Class Cells

Encapsulates a collection of cell relevant objects, such as Cell, Row, ...etc.

Example:

$workbook = new cells\Workbook();
$cells = $workbook->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
functiongetColumns()
Gets the collection of Column objects that represents the individual columns in this worksheet.
functiongetCount()
Gets the total count of instantiated Cell objects.
functiongetCountLarge()
Gets the total count of instantiated Cell objects.
functiongetFirstCell()
Gets the first cell in this worksheet.
functionisDefaultRowHeightMatched()
function
           Indicates that row height and default font height matches
functionisDefaultRowHidden()
function
           Indicates whether the row is default hidden.
functiongetLastCell()
Gets the last cell in this worksheet.
functiongetMaxColumn()
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).
functiongetMaxDataColumn()
Maximum column index of cell which contains data.
functiongetMaxDataRow()
Maximum row index of cell which contains data.
functiongetMaxDisplayRange()
Gets the max range which includes data, merged cells and shapes.
functiongetMaxRow()
Maximum row index of cell which contains data or style.
functiongetMemorySetting()
function
           Gets or sets the memory usage option for this cells. The value of the property is MemorySetting integer constant.
functiongetMergedCells()
Gets the collection of merged cells.
functiongetMinColumn()
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).
functiongetMinDataColumn()
Minimum column index of cell which contains data.
functiongetMinDataRow()
Minimum row index of cell which contains data.
functiongetMinRow()
Minimum row index of cell which contains data or style.
functiongetMultiThreadReading()
function
           Gets or sets whether the cells data model should support Multi-Thread reading. Default value of this property is false.
functiongetOdsCellFields()
Gets the list of fields of ods.
functiongetPreserveString()
function
           Gets or sets a value indicating whether all worksheet values are preserved as strings. Default is false.
functiongetRanges()
Gets the collection of Range objects created at run time.
functiongetRows()
Gets the collection of Row objects that represents the individual rows in this worksheet.
functiongetStandardHeight()
function
           Gets or sets the default row height in this worksheet, in unit of points.
functiongetStandardHeightInch()
function
           Gets or sets the default row height in this worksheet, in unit of inches.
functiongetStandardHeightPixels()
function
           Gets or sets the default row height in this worksheet, in unit of pixels.
functiongetStandardWidth()
function
           Gets or sets the default column width in the worksheet, in unit of characters.
functiongetStandardWidthInch()
function
           Gets or sets the default column width in the worksheet, in unit of inches.
functiongetStandardWidthPixels()
function
           Gets or sets the default column width in the worksheet, in unit of pixels.
functiongetStyle()
function
setStyle(value)
           Gets and sets the default style of the worksheet.
functionget(row, column)
Gets the Cell element at the specified cell row index and column index.
functionget(cellName)
Gets the Cell element at the specified cell name.
 
Method Summary
functionaddRange(rangeObject)
Adds a range object reference to cells
functionapplyColumnStyle(column, style, flag)
Applies formats for a whole column.
functionapplyRowStyle(row, style, flag)
Applies formats for a whole row.
functionapplyStyle(style, flag)
Applies formats for a whole worksheet.
functioncheckCell(row, column)
Gets the Cell element or null at the specified cell row index and column index.
functioncheckColumn(columnIndex)
Gets the Column element or null at the specified column index.
functioncheckRow(row)
Gets the Row element or null at the specified cell row index.
functionclear()
Clears all data of the worksheet.
functionclearContents(range)
Clears contents of a range.
functionclearContents(startRow, startColumn, endRow, endColumn)
Clears contents of a range.
functionclearFormats(range)
Clears formatting of a range.
functionclearFormats(startRow, startColumn, endRow, endColumn)
Clears formatting of a range.
functionclearMergedCells()
Clears all merged ranges.
functionclearRange(range)
Clears contents and formatting of a range.
functionclearRange(startRow, startColumn, endRow, endColumn)
Clears contents and formatting of a range.
functionconvertStringToNumericValue()
Converts all string data in the worksheet to numeric value if possible.
functioncopyColumn(sourceCells, sourceColumnIndex, destinationColumnIndex)
Copies data and formats of a whole column.
functioncopyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber)
Copies data and formats of a whole column.
functioncopyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber, pasteOptions)
Copies data and formats of a whole column.
functioncopyColumns(sourceCells, sourceColumnIndex, sourceTotalColumns, destinationColumnIndex, destinationTotalColumns)
Copies data and formats of the whole columns.
functioncopyRow(sourceCells, sourceRowIndex, destinationRowIndex)
Copies data and formats of a whole row.
functioncopyRows(sourceCells, sourceRowIndex, destinationRowIndex, rowNumber)
Copies data and formats of some whole rows.
functioncopyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions)
Copies data and formats of some whole rows.
functioncopyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions, pasteOptions)
Copies data and formats of some whole rows.
functioncreateRange(firstIndex, number, isVertical)
Creates a Range object from rows of cells or columns of cells.
functioncreateRange(firstRow, firstColumn, totalRows, totalColumns)
Creates a Range object from a range of cells.
functioncreateRange(address)
Creates a Range object from an address of the range.
functioncreateRange(upperLeftCell, lowerRightCell)
Creates a Range object from a range of cells.
functiondeleteBlankColumns()
Delete all blank columns which do not contain any data.
functiondeleteBlankColumns(options)
Delete all blank columns which do not contain any data.
functiondeleteBlankRows()
Delete all blank rows which do not contain any data or other object.
functiondeleteBlankRows(options)
Delete all blank rows which do not contain any data or other object.
functiondeleteColumn(columnIndex)
Deletes a column.
functiondeleteColumn(columnIndex, updateReference)
Deletes a column.
functiondeleteColumns(columnIndex, totalColumns, updateReference)
Deletes several columns.
functiondeleteRange(startRow, startColumn, endRow, endColumn, shiftType)
Deletes a range of cells and shift cells according to the shift option.
functiondeleteRow(rowIndex)
Deletes a row.
functiondeleteRow(rowIndex, updateReference)
Deletes a row.
functiondeleteRows(rowIndex, totalRows)
Deletes several rows.
functiondeleteRows(rowIndex, totalRows, updateReference)
Deletes multiple rows in the worksheet.
functiondispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
functionendCellInColumn(startRow, endRow, startColumn, endColumn)
Gets the last cell with maximum column index in this range.
functionendCellInColumn(columnIndex)
Gets the last cell in this column.
functionendCellInRow(rowIndex)
Gets the last cell in this row.
functionendCellInRow(startRow, endRow, startColumn, endColumn)
Gets the last cell with maximum row index in this range.
functionfind(what, previousCell)
Finds the cell containing with the input object.
functionfind(what, previousCell, findOptions)
Finds the cell containing with the input object.
functiongetCellStyle(row, column)
Get the style of given cell.
functiongetColumnWidth(column)
Gets the width(in unit of characters) of the specified column in normal view
functiongetColumnWidthInch(column)
Gets the width of the specified column in normal view, in units of inches.
functiongetColumnWidthPixel(column)
Gets the width of the specified column in normal view, in units of pixel.
functiongetColumnWidthPixel(column, original)
Gets the width of the specified column in normal view, in units of pixel.
functiongetDependents(isAll, row, column)
Get all cells which refer to the specific cell.
functiongetDependentsInCalculation(row, column, recursive)
Gets all cells whose calculated result depends on specific cell.
functiongetGroupedColumnOutlineLevel(columnIndex)
Gets the outline level (zero-based) of the column.
functiongetGroupedRowOutlineLevel(rowIndex)
Gets the outline level (zero-based) of the row.
functiongetLastDataRow(column)
Gets the last row index of cell which contains data in the specified column.
functiongetMaxGroupedColumnOutlineLevel()
Gets the max grouped column outline level (zero-based).
functiongetMaxGroupedRowOutlineLevel()
Gets the max grouped row outline level (zero-based).
functiongetMergedAreas()
Gets all merged cells.
functiongetRowEnumerator()
Gets the rows enumerator.
functiongetRowHeight(row)
Gets the height of a specified row, in unit of points.
functiongetRowHeightInch(row)
Gets the height of a specified row in unit of inches.
functiongetRowHeightPixel(row)
Gets the height of a specified row in unit of pixel.
functiongetRowOriginalHeightPoint(row)
Gets original row's height in unit of point if the row is hidden
functiongetViewColumnWidthPixel(column)
Get the width in different view type.
functiongetViewRowHeight(row)
Gets the height of a specified row.
functiongetViewRowHeightInch(row)
Gets the height of a specified row in unit of inches.
functiongroupColumns(firstIndex, lastIndex)
Groups columns.
functiongroupColumns(firstIndex, lastIndex, isHidden)
Groups columns.
functiongroupRows(firstIndex, lastIndex)
Groups rows.
functiongroupRows(firstIndex, lastIndex, isHidden)
Groups rows.
functionhideColumn(column)
Hides a column.
functionhideColumns(column, totalColumns)
Hide multiple columns.
functionhideGroupDetail(isVertical, index)
Collapses the grouped rows/columns.
functionhideRow(row)
Hides a row.
functionhideRows(row, totalRows)
Hides multiple rows.
functionimportCSV(fileName, options, firstRow, firstColumn)
Import a CSV file to the cells.
functionimportCSV(fileName, splitter, convertNumericData, firstRow, firstColumn)
Import a CSV file to the cells.
functionimportFormulaArray(stringArray, firstRow, firstColumn, isVertical)
Imports an array of formula into a worksheet.
functioninsertColumn(columnIndex)
Inserts a new column into the worksheet.
functioninsertColumn(columnIndex, updateReference)
Inserts a new column into the worksheet.
functioninsertColumns(columnIndex, totalColumns)
Inserts some columns into the worksheet.
functioninsertColumns(columnIndex, totalColumns, updateReference)
Inserts some columns into the worksheet.
functioninsertCutCells(cutRange, row, column, shiftType)
Insert cut range.
functioninsertRange(area, shiftType)
Inserts a range of cells and shift cells according to the shift option.
functioninsertRange(area, shiftNumber, shiftType)
Inserts a range of cells and shift cells according to the shift option.
functioninsertRange(area, shiftNumber, shiftType, updateReference)
Inserts a range of cells and shift cells according to the shift option.
functioninsertRow(rowIndex)
Inserts a new row into the worksheet.
functioninsertRows(rowIndex, totalRows)
Inserts multiple rows into the worksheet.
functioninsertRows(rowIndex, totalRows, updateReference)
Inserts multiple rows into the worksheet.
functioninsertRows(rowIndex, totalRows, options)
Inserts multiple rows into the worksheet.
functionisBlankColumn(columnIndex)
Checks whether given column is blank(does not contain any data).
functionisColumnHidden(columnIndex)
Checks whether a column at given index is hidden.
functionisDeletingRangeEnabled(startRow, startColumn, totalRows, totalColumns)
Check whether the range could be deleted.
functionisRowHidden(rowIndex)
Checks whether a row at given index is hidden.
functioniterator()
Gets the cells enumerator.
functionlinkToXmlMap(mapName, row, column, path)
Link to a xml map.
functionmerge(firstRow, firstColumn, totalRows, totalColumns)
Merges a specified range of cells into a single cell.
functionmerge(firstRow, firstColumn, totalRows, totalColumns, mergeConflict)
Merges a specified range of cells into a single cell.
functionmerge(firstRow, firstColumn, totalRows, totalColumns, checkConflict, mergeConflict)
Merges a specified range of cells into a single cell.
functionmoveRange(sourceArea, destRow, destColumn)
Moves the range.
functionremoveDuplicates()
Removes duplicate rows in the sheet.
functionremoveDuplicates(startRow, startColumn, endRow, endColumn)
Removes duplicate values in the range.
functionremoveDuplicates(startRow, startColumn, endRow, endColumn, hasHeaders, columnOffsets)
Removes duplicate data of the range.
functionremoveFormulas()
Removes all formula and replaces with the value of the formula.
functionretrieveSubtotalSetting(ca)
Retrieves subtotals setting of the range.
functionsetColumnWidth(column, width)
Sets the width of the specified column in normal view.
functionsetColumnWidthInch(column, inches)
Sets column width in unit of inches in normal view.
functionsetColumnWidthPixel(column, pixels)
Sets column width in unit of pixels in normal view.
functionsetRowHeight(row, height)
Sets the height of the specified row.
functionsetRowHeightInch(row, inches)
Sets row height in unit of inches.
functionsetRowHeightPixel(row, pixels)
Sets row height in unit of pixels.
functionsetViewColumnWidthPixel(column, pixels)
Sets the width of the column in different view.
functionshowGroupDetail(isVertical, index)
Expands the grouped rows/columns.
functionsubtotal(ca, groupBy, function, totalList)
Creates subtotals for the range.
functionsubtotal(ca, groupBy, function, totalList, replace, pageBreaks, summaryBelowData)
Creates subtotals for the range.
functiontextToColumns(row, column, totalRows, options)
Splits the text in the column to columns.
functionungroupColumns(firstIndex, lastIndex)
Ungroups columns.
functionungroupRows(firstIndex, lastIndex)
Ungroups rows.
functionungroupRows(firstIndex, lastIndex, isAll)
Ungroups rows.
functionunhideColumn(column, width)
Unhides a column
functionunhideColumns(column, totalColumns, width)
Unhide multiple columns.
functionunhideRow(row, height)
Unhides a row.
functionunhideRows(row, totalRows, height)
Unhides the hidden rows.
functionunMerge(firstRow, firstColumn, totalRows, totalColumns)
Unmerges a specified range of merged cells.
 

    • Property Getters/Setters Detail

      • getCount : Number 

        function getCount()
        
        Gets the total count of instantiated Cell objects.
      • getCountLarge : long 

        function getCountLarge()
        
        Gets the total count of instantiated Cell objects.
      • getRows : RowCollection 

        function getRows()
        
        Gets the collection of Row objects that represents the individual rows in this worksheet.
      • getMergedCells : ArrayList 

        function getMergedCells()
        
        Gets the collection of merged cells. In this collection, each item is a CellArea structure which represents an area of merged cells. NOTE: This method is now obsolete. Instead, please use Cells.GetMergedAreas() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced.
      • getMultiThreadReading/setMultiThreadReading : boolean 

        function getMultiThreadReading() / function 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. Please note, some features cannot support Multi-Thread reading, such as formatting values(by Cell.StringValue, Cell.DisplayStringValue, .etc.). So, even with this property being set as true, those APIs still may give unexpected result for Multi-Thread reading.
      • getMemorySetting/setMemorySetting : Number 

        function getMemorySetting() / function setMemorySetting(value)
        
        Gets or sets the memory usage option for this cells. The value of the property is MemorySetting integer constant.
      • getStyle/setStyle : Style 

        function getStyle() / function setStyle(value)
        
        Gets and sets the default style of the worksheet.
      • getStandardWidthInch/setStandardWidthInch : Number 

        function getStandardWidthInch() / function setStandardWidthInch(value)
        
        Gets or sets the default column width in the worksheet, in unit of inches.
      • getStandardWidthPixels/setStandardWidthPixels : Number 

        function getStandardWidthPixels() / function setStandardWidthPixels(value)
        
        Gets or sets the default column width in the worksheet, in unit of pixels.
      • getStandardWidth/setStandardWidth : Number 

        function getStandardWidth() / function setStandardWidth(value)
        
        Gets or sets the default column width in the worksheet, in unit of characters.
      • getStandardHeight/setStandardHeight : Number 

        function getStandardHeight() / function setStandardHeight(value)
        
        Gets or sets the default row height in this worksheet, in unit of points.
      • getStandardHeightPixels/setStandardHeightPixels : Number 

        function getStandardHeightPixels() / function setStandardHeightPixels(value)
        
        Gets or sets the default row height in this worksheet, in unit of pixels.
      • getStandardHeightInch/setStandardHeightInch : Number 

        function getStandardHeightInch() / function setStandardHeightInch(value)
        
        Gets or sets the default row height in this worksheet, in unit of inches.
      • getPreserveString/setPreserveString : boolean 

        function getPreserveString() / function setPreserveString(value)
        
        Gets or sets a value indicating whether all worksheet values are preserved as strings. Default is false.
      • getMinRow : Number 

        function getMinRow()
        
        Minimum row index of cell which contains data or style.
      • getMaxRow : Number 

        function getMaxRow()
        
        Maximum row index of cell which contains data or style. Return -1 if there is no cell which contains data or style in the worksheet.
      • getMinColumn : Number 

        function 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).
      • getMaxColumn : Number 

        function 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). Return -1 if there is no cell.
      • getMinDataRow : Number 

        function getMinDataRow()
        
        Minimum row index of cell which contains data.
      • getMaxDataRow : Number 

        function getMaxDataRow()
        
        Maximum row index of cell which contains data. Return -1 if there is no cell which contains data.
      • getMinDataColumn : Number 

        function getMinDataColumn()
        
        Minimum column index of cell which contains data. -1 will be returned if there is no cell which contains data. This property needs to iterate and check all cells in a worksheet, so it is a time-consumed progress and should not be invoked repeatedly.
      • getMaxDataColumn : Number 

        function getMaxDataColumn()
        
        Maximum column index of cell which contains data. -1 will be returned if there is no cell which contains data. This property needs to iterate and check all cells in a worksheet, so it is a time-consumed progress and should not be invoked repeatedly.
      • isDefaultRowHeightMatched/setDefaultRowHeightMatched : boolean 

        function isDefaultRowHeightMatched() / function setDefaultRowHeightMatched(value)
        
        Indicates that row height and default font height matches
      • isDefaultRowHidden/setDefaultRowHidden : boolean 

        function isDefaultRowHidden() / function setDefaultRowHidden(value)
        
        Indicates whether the row is default hidden.
      • getColumns : ColumnCollection 

        function getColumns()
        
        Gets the collection of Column objects that represents the individual columns in this worksheet.
      • getRanges : RangeCollection 

        function getRanges()
        
        Gets the collection of Range objects created at run time.
      • getLastCell : Cell 

        function getLastCell()
        
        Gets the last cell in this worksheet. Returns null if there is no data in the worksheet.
      • getMaxDisplayRange : Range 

        function getMaxDisplayRange()
        
        Gets the max range which includes data, merged cells and shapes. Reutrns null if the worksheet is empty since Aspose.Cells 21.5.2.
      • getFirstCell : Cell 

        function getFirstCell()
        
        Gets the first cell in this worksheet. Returns null if there is no data in the worksheet.
      • get : Cell 

        function get(row, column)
        
        Gets the Cell element at the specified cell row index and column index.
        Parameters:
        row - Row index.
        column - Column index.
        Returns:
        The Cell object.

        Example:

        $workbook = new cells\Workbook();
        $cells = $workbook->getWorksheets()->get(0)->getCells();
        $cell =$cells->get(0, 0);    //Gets the cell at "A1"
      • get : Cell 

        function get(cellName)
        
        Gets the Cell element at the specified cell name.
        Parameters:
        cellName - Cell name,including its column letter and row number, for example A5.
        Returns:
        A Cell object

        Example:

        $workbook = new cells\Workbook();
        $cells = $workbook->getWorksheets()->get(0)->getCells();
        $cell =$cells->get("A1");    //Gets the cell at "A1"
    • Method Detail

      • retrieveSubtotalSetting

        function retrieveSubtotalSetting(ca)
        Retrieves subtotals setting of the range.
        Parameters:
        ca: CellArea - The range
        Returns:
      • subtotal

        function subtotal(ca, groupBy, function, totalList)
        Creates subtotals for the range.
        Parameters:
        ca: CellArea - The range
        groupBy: Number - The field to group by, as a zero-based integer offset
        function: Number - A ConsolidationFunction value. The subtotal function.
        totalList: Number Array - An array of zero-based field offsets, indicating the fields to which the subtotals are added.
      • subtotal

        function subtotal(ca, groupBy, function, totalList, replace, pageBreaks, summaryBelowData)
        Creates subtotals for the range.
        Parameters:
        ca: CellArea - The range
        groupBy: Number - The field to group by, as a zero-based integer offset
        function: Number - A ConsolidationFunction value. The subtotal function.
        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 subtotals
        pageBreaks: boolean - Indicates whether add page break between groups
        summaryBelowData: boolean - Indicates whether add summary below data.
      • removeFormulas

        function removeFormulas()
        Removes all formula and replaces with the value of the formula.
      • removeDuplicates

        function removeDuplicates()
        Removes duplicate rows in the sheet.
      • removeDuplicates

        function removeDuplicates(startRow, startColumn, endRow, endColumn)
        Removes duplicate values in the range.
        Parameters:
        startRow: Number - The start row.
        startColumn: Number - The start column
        endRow: Number - The end row index.
        endColumn: Number - The end column index.
      • removeDuplicates

        function removeDuplicates(startRow, startColumn, endRow, endColumn, hasHeaders, columnOffsets)
        Removes duplicate data of the range.
        Parameters:
        startRow: Number - The start row.
        startColumn: Number - The start column
        endRow: Number - The end row index.
        endColumn: Number - The end column index.
        hasHeaders: boolean - Indicates whether the range contains headers.
        columnOffsets: Number Array - The column offsets.
      • convertStringToNumericValue

        function convertStringToNumericValue()
        Converts all string data in the worksheet to numeric value if possible.
      • getDependents

        function getDependents(isAll, row, column)
        Get all cells which refer to the specific cell.
        Parameters:
        isAll: boolean - Indicates whether check other worksheets
        row: Number - The row index.
        column: Number - The column index.
        Returns:
      • getDependentsInCalculation

        function getDependentsInCalculation(row, column, recursive)
        Gets all cells whose calculated result depends on specific cell. To use this method, please make sure the workbook has been set with true value for FormulaSettings.EnableCalculationChain and has been fully calculated with this setting. If there is no formula reference to this cell, null will be returned. For more details and example, please see Cell.getDependentsInCalculation(boolean)
        Parameters:
        row: Number - Row index of the specific cell
        column: Number - 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.
        Returns:
        Enumerator to enumerate all dependents(Cell objects)
      • getCellStyle

        function getCellStyle(row, column)
        Get the style of given cell.
        Parameters:
        row: Number - row index
        column: Number - column
        Returns:
        the style of given cell.
      • getLastDataRow

        function getLastDataRow(column)
        Gets the last row index of cell which contains data in the specified column.
        Parameters:
        column: Number - Column index.
        Returns:
        last row index.
      • applyColumnStyle

        function applyColumnStyle(column, style, flag)
        Applies formats for a whole column.
        Parameters:
        column: Number - The column index.
        style: Style - The style object which will be applied.
        flag: StyleFlag - Flags which indicates applied formatting properties.
      • applyRowStyle

        function applyRowStyle(row, style, flag)
        Applies formats for a whole row.
        Parameters:
        row: Number - The row index.
        style: Style - The style object which will be applied.
        flag: StyleFlag - Flags which indicates applied formatting properties.
      • applyStyle

        function applyStyle(style, flag)
        Applies formats for a whole worksheet.
        Parameters:
        style: Style - The style object which will be applied.
        flag: StyleFlag - Flags which indicates applied formatting properties.
      • copyColumns

        function copyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber, pasteOptions)
        Copies data and formats of a whole column.
        Parameters:
        sourceCells0: Cells - Source Cells object contains data and formats to copy.
        sourceColumnIndex: Number - Source column index.
        destinationColumnIndex: Number - Destination column index.
        columnNumber: Number - The copied column number.
        pasteOptions: PasteOptions - the options of pasting.
      • copyColumn

        function copyColumn(sourceCells, sourceColumnIndex, destinationColumnIndex)
        Copies data and formats of a whole column.
        Parameters:
        sourceCells: Cells - Source Cells object contains data and formats to copy.
        sourceColumnIndex: Number - Source column index.
        destinationColumnIndex: Number - Destination column index.
      • copyColumns

        function copyColumns(sourceCells0, sourceColumnIndex, destinationColumnIndex, columnNumber)
        Copies data and formats of a whole column.
        Parameters:
        sourceCells0: Cells - Source Cells object contains data and formats to copy.
        sourceColumnIndex: Number - Source column index.
        destinationColumnIndex: Number - Destination column index.
        columnNumber: Number - The copied column number.
      • copyColumns

        function copyColumns(sourceCells, sourceColumnIndex, sourceTotalColumns, destinationColumnIndex, destinationTotalColumns)
        Copies data and formats of the whole columns.
        Parameters:
        sourceCells: Cells - Source Cells object contains data and formats to copy.
        sourceColumnIndex: Number - Source column index.
        sourceTotalColumns: Number - The number of the source columns.
        destinationColumnIndex: Number - Destination column index.
        destinationTotalColumns: Number - The number of the destination columns.
      • copyRow

        function copyRow(sourceCells, sourceRowIndex, destinationRowIndex)
        Copies data and formats of a whole row.
        Parameters:
        sourceCells: Cells - Source Cells object contains data and formats to copy.
        sourceRowIndex: Number - Source row index.
        destinationRowIndex: Number - Destination row index.
      • copyRows

        function copyRows(sourceCells, sourceRowIndex, destinationRowIndex, rowNumber)
        Copies data and formats of some whole rows.
        Parameters:
        sourceCells: Cells - Source Cells object contains data and formats to copy.
        sourceRowIndex: Number - Source row index.
        destinationRowIndex: Number - Destination row index.
        rowNumber: Number - The copied row number.
      • copyRows

        function copyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions)
        Copies data and formats of some whole rows.
        Parameters:
        sourceCells0: Cells - Source Cells object contains data and formats to copy.
        sourceRowIndex: Number - Source row index.
        destinationRowIndex: Number - Destination row index.
        rowNumber: Number - The copied row number.
        copyOptions: CopyOptions - The copy options.
      • copyRows

        function copyRows(sourceCells0, sourceRowIndex, destinationRowIndex, rowNumber, copyOptions, pasteOptions)
        Copies data and formats of some whole rows.
        Parameters:
        sourceCells0: Cells - Source Cells object contains data and formats to copy.
        sourceRowIndex: Number - Source row index.
        destinationRowIndex: Number - Destination row index.
        rowNumber: Number - The copied row number.
        copyOptions: CopyOptions - The copy options.
        pasteOptions: PasteOptions - the options of pasting.
      • getGroupedRowOutlineLevel

        function getGroupedRowOutlineLevel(rowIndex)
        Gets the outline level (zero-based) of the row. If the row is not grouped, returns zero.
        Parameters:
        rowIndex: Number - The row index.
        Returns:
        The outline level (zero-based) of the row.
      • getGroupedColumnOutlineLevel

        function getGroupedColumnOutlineLevel(columnIndex)
        Gets the outline level (zero-based) of the column. If the column is not grouped, returns zero.
        Parameters:
        columnIndex: Number - The column index
        Returns:
        The outline level of the column
      • getMaxGroupedColumnOutlineLevel

        function getMaxGroupedColumnOutlineLevel()
        Gets the max grouped column outline level (zero-based).
        Returns:
        The max grouped column outline level (zero-based)
      • getMaxGroupedRowOutlineLevel

        function getMaxGroupedRowOutlineLevel()
        Gets the max grouped row outline level (zero-based).
        Returns:
        The max grouped row outline level (zero-based)
      • showGroupDetail

        function showGroupDetail(isVertical, index)
        Expands the grouped rows/columns.
        Parameters:
        isVertical: boolean - True, expands the grouped rows.
        index: Number - The row/column index
      • hideGroupDetail

        function hideGroupDetail(isVertical, index)
        Collapses the grouped rows/columns.
        Parameters:
        isVertical: boolean - True, collapse the grouped rows.
        index: Number - The row/column index
      • ungroupColumns

        function ungroupColumns(firstIndex, lastIndex)
        Ungroups columns.
        Parameters:
        firstIndex: Number - The first column index to be ungrouped.
        lastIndex: Number - The last column index to be ungrouped.
      • groupColumns

        function groupColumns(firstIndex, lastIndex)
        Groups columns.
        Parameters:
        firstIndex: Number - The first column index to be grouped.
        lastIndex: Number - The last column index to be grouped.
      • groupColumns

        function groupColumns(firstIndex, lastIndex, isHidden)
        Groups columns.
        Parameters:
        firstIndex: Number - The first column index to be grouped.
        lastIndex: Number - The last column index to be grouped.
        isHidden: boolean - Specifies if the grouped columns are hidden.
      • ungroupRows

        function ungroupRows(firstIndex, lastIndex, isAll)
        Ungroups rows.
        Parameters:
        firstIndex: Number - The first row index to be ungrouped.
        lastIndex: Number - The last row index to be ungrouped.
        isAll: boolean - True, removes all grouped info.Otherwise, remove the outer group info.
      • ungroupRows

        function ungroupRows(firstIndex, lastIndex)
        Ungroups rows. Only removes outer group info.
        Parameters:
        firstIndex: Number - The first row index to be ungrouped.
        lastIndex: Number - The last row index to be ungrouped.
      • groupRows

        function groupRows(firstIndex, lastIndex, isHidden)
        Groups rows.
        Parameters:
        firstIndex: Number - The first row index to be grouped.
        lastIndex: Number - The last row index to be grouped.
        isHidden: boolean - Specifies if the grouped rows are hidden.
      • groupRows

        function groupRows(firstIndex, lastIndex)
        Groups rows.
        Parameters:
        firstIndex: Number - The first row index to be grouped.
        lastIndex: Number - The last row index to be grouped.
      • deleteColumn

        function deleteColumn(columnIndex, updateReference)
        Deletes a column.
        Parameters:
        columnIndex: Number - Index of the column to be deleted.
        updateReference: boolean - Indicates whether update references in other worksheets.
      • deleteColumn

        function deleteColumn(columnIndex)
        Deletes a column.
        Parameters:
        columnIndex: Number - Index of the column to be deleted.
      • deleteColumns

        function deleteColumns(columnIndex, totalColumns, updateReference)
        Deletes several columns.
        Parameters:
        columnIndex: Number - Index of the first column to be deleted.
        totalColumns: Number - Count of columns to be deleted.
        updateReference: boolean - Indicates whether update references in other worksheets.
      • isDeletingRangeEnabled

        function isDeletingRangeEnabled(startRow, startColumn, totalRows, totalColumns)
        Check whether the range could be deleted.
        Parameters:
        startRow: Number - The start row index of the range.
        startColumn: Number - The start column index of the range.
        totalRows: Number - The number of the rows in the range.
        totalColumns: Number - The number of the columns in the range.
        Returns:
      • deleteRow

        function deleteRow(rowIndex)
        Deletes a row.
        Parameters:
        rowIndex: Number - Index of the row to be deleted.
      • deleteRows

        function deleteRows(rowIndex, totalRows)
        Deletes several rows. If the deleted range contains the top part(not whole) of the table(ListObject), the ranged could not be deleted and nothing will be done. It works in the same way with MS Excel.
        Parameters:
        rowIndex: Number - The first row index to be deleted.
        totalRows: Number - Count of rows to be deleted.
      • deleteRow

        function deleteRow(rowIndex, updateReference)
        Deletes a row.
        Parameters:
        rowIndex: Number - Index of the row to be deleted.
        updateReference: boolean - Indicates whether update references in other worksheets.
      • deleteRows

        function deleteRows(rowIndex, totalRows, updateReference)
        Deletes multiple rows in the worksheet.
        Parameters:
        rowIndex: Number - Index of the first row to be deleted.
        totalRows: Number - Count of rows to be deleted.
        updateReference: boolean - Indicates whether update references in other worksheets.
        Returns:
      • deleteBlankColumns

        function deleteBlankColumns()
        Delete all blank columns which do not contain any data.
      • deleteBlankColumns

        function deleteBlankColumns(options)
        Delete all blank columns which do not contain any data.
        Parameters:
        options: DeleteOptions - The options of deleting range.
      • isBlankColumn

        function isBlankColumn(columnIndex)
        Checks whether given column is blank(does not contain any data).
        Parameters:
        columnIndex: Number - the column index
        Returns:
        true if given column does not contain any data
      • deleteBlankRows

        function deleteBlankRows()
        Delete all blank rows which do not contain any data or other object.
      • deleteBlankRows

        function deleteBlankRows(options)
        Delete all blank rows which do not contain any data or other object. For blank rows that will be deleted, it is not only required that Row.IsBlank should be true, but also there should be no visible comment defined for any cell in those rows, and no pivot table whose range intersects with them.
        Parameters:
        options: DeleteOptions - The options of deleting range.
      • insertColumns

        function insertColumns(columnIndex, totalColumns)
        Inserts some columns into the worksheet.
        Parameters:
        columnIndex: Number - Column index.
        totalColumns: Number - The number of columns.
      • insertColumns

        function insertColumns(columnIndex, totalColumns, updateReference)
        Inserts some columns into the worksheet.
        Parameters:
        columnIndex: Number - Column index.
        totalColumns: Number - The number of columns.
        updateReference: boolean - Indicates if references in other worksheets will be updated.
      • insertColumn

        function insertColumn(columnIndex, updateReference)
        Inserts a new column into the worksheet.
        Parameters:
        columnIndex: Number - Column index.
        updateReference: boolean - Indicates if references in other worksheets will be updated.
      • insertColumn

        function insertColumn(columnIndex)
        Inserts a new column into the worksheet.
        Parameters:
        columnIndex: Number - Column index.
      • insertRows

        function insertRows(rowIndex, totalRows, updateReference)
        Inserts multiple rows into the worksheet.
        Parameters:
        rowIndex: Number - Row index.
        totalRows: Number - Number of rows to be inserted.
        updateReference: boolean - Indicates if references in other worksheets will be updated.
      • insertRows

        function insertRows(rowIndex, totalRows, options)
        Inserts multiple rows into the worksheet.
        Parameters:
        rowIndex: Number - Row index.
        totalRows: Number - Number of rows to be inserted.
        options: InsertOptions - Indicates if references in other worksheets will be updated.
      • insertRows

        function insertRows(rowIndex, totalRows)
        Inserts multiple rows into the worksheet.
        Parameters:
        rowIndex: Number - Row index.
        totalRows: Number - Number of rows to be inserted.
      • insertRow

        function insertRow(rowIndex)
        Inserts a new row into the worksheet.
        Parameters:
        rowIndex: Number - Row index.
      • clearRange

        function clearRange(range)
        Clears contents and formatting of a range.
        Parameters:
        range: CellArea - Range to be cleared.
      • clearRange

        function clearRange(startRow, startColumn, endRow, endColumn)
        Clears contents and formatting of a range.
        Parameters:
        startRow: Number - Start row index.
        startColumn: Number - Start column index.
        endRow: Number - End row index.
        endColumn: Number - End column index.
      • clearContents

        function clearContents(range)
        Clears contents of a range.
        Parameters:
        range: CellArea - Range to be cleared.
      • clearContents

        function clearContents(startRow, startColumn, endRow, endColumn)
        Clears contents of a range.
        Parameters:
        startRow: Number - Start row index.
        startColumn: Number - Start column index.
        endRow: Number - End row index.
        endColumn: Number - End column index.
      • clearFormats

        function clearFormats(range)
        Clears formatting of a range.
        Parameters:
        range: CellArea - Range to be cleared.
      • clearFormats

        function clearFormats(startRow, startColumn, endRow, endColumn)
        Clears formatting of a range.
        Parameters:
        startRow: Number - Start row index.
        startColumn: Number - Start column index.
        endRow: Number - End row index.
        endColumn: Number - End column index.
      • linkToXmlMap

        function linkToXmlMap(mapName, row, column, path)
        Link to a xml map. e.g. A xml map element structure: -RootElement |-Attribute1 |-SubElement |-Attribute2 |-Attribute3 To link "Attribute1", path is "/RootElement/Attribute1" To link "Attribute2", path is "/RootElement/SubElement/Attribute2" To link whole "SubElement", path is "/RootElement/SubElement"
        Parameters:
        mapName: String - name of xml map
        row: Number - row of the destination cell
        column: Number - column of the destination cell
        path: String - path of xml element in xml map
      • find

        function find(what, previousCell)
        Finds the cell containing with the input object. Returns null (Nothing) if no cell is found.
        Parameters:
        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.
        Returns:
        Cell object.
      • find

        function find(what, previousCell, findOptions)
        Finds the cell containing with the input object. Returns null (Nothing) if no cell is found.
        Parameters:
        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 options
        Returns:
        Cell object.
      • endCellInRow

        function endCellInRow(rowIndex)
        Gets the last cell in this row.
        Parameters:
        rowIndex: Number - Row index.
        Returns:
        Cell object.
      • endCellInColumn

        function endCellInColumn(columnIndex)
        Gets the last cell in this column.
        Parameters:
        columnIndex: Number - Column index.
        Returns:
        Cell object.
      • endCellInColumn

        function endCellInColumn(startRow, endRow, startColumn, endColumn)
        Gets the last cell with maximum column index in this range.
        Parameters:
        startRow: Number - Start row index.
        endRow: Number - End row index.
        startColumn: Number - Start column index.
        endColumn: Number - End column index.
        Returns:
        Cell object.
      • endCellInRow

        function endCellInRow(startRow, endRow, startColumn, endColumn)
        Gets the last cell with maximum row index in this range.
        Parameters:
        startRow: Number - Start row index.
        endRow: Number - End row index.
        startColumn: Number - Start column index.
        endColumn: Number - End column index.
        Returns:
        Cell object.
      • moveRange

        function moveRange(sourceArea, destRow, destColumn)
        Moves the range.
        Parameters:
        sourceArea: CellArea - The range which should be moved.
        destRow: Number - The dest row.
        destColumn: Number - The dest column.
      • insertCutCells

        function insertCutCells(cutRange, row, column, shiftType)
        Insert cut range.
        Parameters:
        cutRange: Range - The cut range.
        row: Number - The row.
        column: Number - The column.
        shiftType: Number - A ShiftType value. The shift type .
      • insertRange

        function insertRange(area, shiftNumber, shiftType, updateReference)
        Inserts a range of cells and shift cells according to the shift option.
        Parameters:
        area: CellArea - Shift area.
        shiftNumber: Number - Number of rows or columns to be inserted.
        shiftType: Number - A ShiftType value. Shift cells option.
        updateReference: boolean - Indicates whether update references in other worksheets.
      • insertRange

        function insertRange(area, shiftType)
        Inserts a range of cells and shift cells according to the shift option.
        Parameters:
        area: CellArea - Shift area.
        shiftType: Number - A ShiftType value. Shift cells option.
      • insertRange

        function insertRange(area, shiftNumber, shiftType)
        Inserts a range of cells and shift cells according to the shift option.
        Parameters:
        area: CellArea - Shift area.
        shiftNumber: Number - Number of rows or columns to be inserted.
        shiftType: Number - A ShiftType value. Shift cells option.
      • deleteRange

        function deleteRange(startRow, startColumn, endRow, endColumn, shiftType)
        Deletes a range of cells and shift cells according to the shift option.
        Parameters:
        startRow: Number - Start row index.
        startColumn: Number - Start column index.
        endRow: Number - End row index.
        endColumn: Number - End column index.
        shiftType: Number - A ShiftType value. Shift cells option.
      • dispose

        function dispose()
        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
      • iterator

        function iterator()
        Gets the cells enumerator. When traversing elements by the returned Enumerator, the cells collection should not be modified(such as operations that will cause new Cell/Row be instantiated or existing Cell/Row be deleted). Otherwise the enumerator may not be able to traverse all cells correctly(some elements may be traversed repeatedly or skipped).
        Returns:
        The cells enumerator
      • getRowEnumerator

        function getRowEnumerator()
        Gets the rows enumerator. NOTE: This member is now obsolete. Instead, please use RowCollection.GetEnumerator() method. This method will be removed 12 months later since May 2023. Aspose apologizes for any inconvenience you may have experienced.
        Returns:
        The rows enumerator.
        See Also:
        RowCollection.iterator()
      • getMergedAreas

        function getMergedAreas()
        Gets all merged cells.
      • checkCell

        function checkCell(row, column)
        Gets the Cell element or null at the specified cell row index and column index.
        Parameters:
        row: Number - Row index
        column: Number - Column index
        Returns:
        Return Cell object if a Cell object exists. Return null if the cell does not exist.
      • checkRow

        function checkRow(row)
        Gets the Row element or null at the specified cell row index.
        Parameters:
        row: Number - Row index
        Returns:
        Returns Row object If the row object does exist, otherwise returns null.
      • checkColumn

        function checkColumn(columnIndex)
        Gets the Column element or null at the specified column index.
        Parameters:
        columnIndex: Number - The column index.
        Returns:
        The Column object.
      • isRowHidden

        function isRowHidden(rowIndex)
        Checks whether a row at given index is hidden.
        Parameters:
        rowIndex: Number - row index
        Returns:
        true if the row is hidden
      • isColumnHidden

        function isColumnHidden(columnIndex)
        Checks whether a column at given index is hidden.
        Parameters:
        columnIndex: Number - column index
        Returns:
        true if the column is hidden.
      • addRange

        function addRange(rangeObject)
        Adds a range object reference to cells
        Parameters:
        rangeObject: Range - The range object will be contained in the cells
      • createRange

        function createRange(upperLeftCell, lowerRightCell)
        Creates a Range object from a range of cells.
        Parameters:
        upperLeftCell: String - Upper left cell name.
        lowerRightCell: String - Lower right cell name.
        Returns:
        A Range object
      • createRange

        function createRange(firstRow, firstColumn, totalRows, totalColumns)
        Creates a Range object from a range of cells.
        Parameters:
        firstRow: Number - First row of this range
        firstColumn: Number - First column of this range
        totalRows: Number - Number of rows
        totalColumns: Number - Number of columns
        Returns:
        A Range object
      • createRange

        function createRange(address)
        Creates a Range object from an address of the range.
        Parameters:
        address: String - The address of the range.
        Returns:
        A Range object
      • createRange

        function createRange(firstIndex, number, isVertical)
        Creates a Range object from rows of cells or columns of cells.
        Parameters:
        firstIndex: Number - First row index or first column index, zero based.
        number: Number - Total number of rows or columns, one based.
        isVertical: boolean - True - Range created from columns of cells. False - Range created from rows of cells.
        Returns:
        A Range object.
      • clear

        function clear()
        Clears all data of the worksheet.
      • importFormulaArray

        function importFormulaArray(stringArray, firstRow, firstColumn, isVertical)
        Imports an array of formula into a worksheet.
        Parameters:
        stringArray: String[] - Formula array.
        firstRow: Number - The row number of the first cell to import in.
        firstColumn: Number - The column number of the first cell to import in.
        isVertical: boolean - Specifies to import data vertically or horizontally.
      • textToColumns

        function textToColumns(row, column, totalRows, options)
        Splits the text in the column to columns.
        Parameters:
        row: Number - The row index.
        column: Number - The column index.
        totalRows: Number - The number of rows.
        options: TxtLoadOptions - The split options.
      • importCSV

        function importCSV(fileName, splitter, convertNumericData, firstRow, firstColumn)
        Import a CSV file to the cells.
        Parameters:
        fileName: String - The CSV file name.
        splitter: String - The splitter
        convertNumericData: boolean - Whether the string in text file is converted to numeric data.
        firstRow: Number - The row number of the first cell to import in.
        firstColumn: Number - The column number of the first cell to import in.
      • importCSV

        function importCSV(fileName, options, firstRow, firstColumn)
        Import a CSV file to the cells.
        Parameters:
        fileName: String - The CSV file name.
        options: TxtLoadOptions - The load options for reading text file
        firstRow: Number - The row number of the first cell to import in.
        firstColumn: Number - The column number of the first cell to import in.
      • merge

        function merge(firstRow, firstColumn, totalRows, totalColumns)
        Merges a specified range of cells into a single cell. Reference the merged cell via the address of the upper-left cell in the range.
        Parameters:
        firstRow: Number - First row of this range(zero based)
        firstColumn: Number - First column of this range(zero based)
        totalRows: Number - Number of rows(one based)
        totalColumns: Number - Number of columns(one based)
      • merge

        function merge(firstRow, firstColumn, totalRows, totalColumns, mergeConflict)
        Merges a specified range of cells into a single cell. Reference the merged cell via the address of the upper-left cell in the range. If mergeConflict is true and the merged range conflicts with other merged cells, other merged cells will be automatically removed.
        Parameters:
        firstRow: Number - First row of this range(zero based)
        firstColumn: Number - First column of this range(zero based)
        totalRows: Number - Number of rows(one based)
        totalColumns: Number - Number of columns(one based)
        mergeConflict: boolean - Merge conflict merged ranges.
      • merge

        function merge(firstRow, firstColumn, totalRows, totalColumns, checkConflict, mergeConflict)
        Merges a specified range of cells into a single cell. Reference the merged cell via the address of the upper-left cell in the range. If mergeConflict is true and the merged range conflicts with other merged cells, other merged cells will be automatically removed.
        Parameters:
        firstRow: Number - First row of this range(zero based)
        firstColumn: Number - First column of this range(zero based)
        totalRows: Number - Number of rows(one based)
        totalColumns: Number - Number of columns(one based)
        checkConflict: boolean - Indicates whether check the merged cells intersects other merged cells
        mergeConflict: boolean - Merge conflict merged ranges.
      • unMerge

        function unMerge(firstRow, firstColumn, totalRows, totalColumns)
        Unmerges a specified range of merged cells.
        Parameters:
        firstRow: Number - First row of this range(zero based)
        firstColumn: Number - First column of this range(zero based)
        totalRows: Number - Number of rows(one based)
        totalColumns: Number - Number of columns(one based)
      • clearMergedCells

        function clearMergedCells()
        Clears all merged ranges.
      • hideRow

        function hideRow(row)
        Hides a row.
        Parameters:
        row: Number - Row index.
      • unhideRow

        function unhideRow(row, height)
        Unhides a row.
        Parameters:
        row: Number - Row index.
        height: Number - Row height. The row's height will be changed only when the row is hidden and given height value is positive.
      • hideRows

        function hideRows(row, totalRows)
        Hides multiple rows.
        Parameters:
        row: Number - The row index.
        totalRows: Number - The row number.
      • unhideRows

        function unhideRows(row, totalRows, height)
        Unhides the hidden rows.
        Parameters:
        row: Number - The row index.
        totalRows: Number - The row number.
        height: Number - Row height. The row's height will be changed only when the row is hidden and given height value is positive.
      • setRowHeightPixel

        function setRowHeightPixel(row, pixels)
        Sets row height in unit of pixels.
        Parameters:
        row: Number - Row index.
        pixels: Number - Number of pixels.
      • setRowHeightInch

        function setRowHeightInch(row, inches)
        Sets row height in unit of inches.
        Parameters:
        row: Number - Row index.
        inches: Number - Number of inches. It should be between 0 and 409.5/72.
      • setRowHeight

        function setRowHeight(row, height)
        Sets the height of the specified row.
        Parameters:
        row: Number - Row index.
        height: Number - Height of row.In unit of point It should be between 0 and 409.5.
      • getRowOriginalHeightPoint

        function getRowOriginalHeightPoint(row)
        Gets original row's height in unit of point if the row is hidden
        Parameters:
        row: Number - The row index.
        Returns:
      • hideColumn

        function hideColumn(column)
        Hides a column.
        Parameters:
        column: Number - Column index.
      • unhideColumn

        function unhideColumn(column, width)
        Unhides a column
        Parameters:
        column: Number - Column index.
        width: Number - Column width.
      • hideColumns

        function hideColumns(column, totalColumns)
        Hide multiple columns.
        Parameters:
        column: Number - Column index.
        totalColumns: Number - Column number.
      • unhideColumns

        function unhideColumns(column, totalColumns, width)
        Unhide multiple columns. Only applies the column width to the hidden columns.
        Parameters:
        column: Number - Column index.
        totalColumns: Number - Column number
        width: Number - Column width.
      • getRowHeight

        function getRowHeight(row)
        Gets the height of a specified row, in unit of points.
        Parameters:
        row: Number - Row index
        Returns:
        Height of row
      • getViewRowHeight

        function getViewRowHeight(row)
        Gets the height of a specified row.
        Parameters:
        row: Number - Row index.
        Returns:
        Height of row.
      • getRowHeightPixel

        function getRowHeightPixel(row)
        Gets the height of a specified row in unit of pixel.
        Parameters:
        row: Number - Row index
        Returns:
        Height of row
      • getRowHeightInch

        function getRowHeightInch(row)
        Gets the height of a specified row in unit of inches.
        Parameters:
        row: Number - Row index
        Returns:
        Height of row
      • getViewRowHeightInch

        function getViewRowHeightInch(row)
        Gets the height of a specified row in unit of inches.
        Parameters:
        row: Number - Row index
        Returns:
        Height of row
      • setColumnWidthPixel

        function setColumnWidthPixel(column, pixels)
        Sets column width in unit of pixels in normal view.
        Parameters:
        column: Number - Column index.
        pixels: Number - Number of pixels.
      • setColumnWidthInch

        function setColumnWidthInch(column, inches)
        Sets column width in unit of inches in normal view.
        Parameters:
        column: Number - Column index.
        inches: Number - Number of inches.
      • setColumnWidth

        function setColumnWidth(column, width)
        Sets the width of the specified column in normal view. To hide a column, sets column width to zero.
        Parameters:
        column: Number - Column index.
        width: Number - Width of column.Column width must be between 0 and 255.
      • getColumnWidthPixel

        function getColumnWidthPixel(column)
        Gets the width of the specified column in normal view, in units of pixel.
        Parameters:
        column: Number - Column index
        Returns:
        Width of column in normal view.
      • getColumnWidthPixel

        function getColumnWidthPixel(column, original)
        Gets the width of the specified column in normal view, in units of pixel.
        Parameters:
        column: Number - Column index
        original: boolean - Indicates whether returning original width even when the column is hidden
        Returns:
        Width of column in normal view.
      • getColumnWidthInch

        function getColumnWidthInch(column)
        Gets the width of the specified column in normal view, in units of inches.
        Parameters:
        column: Number - Column index
        Returns:
        Width of column
      • getColumnWidth

        function getColumnWidth(column)
        Gets the width(in unit of characters) of the specified column in normal view
        Parameters:
        column: Number - Column index
        Returns:
        Width of column. For spreadsheet, column width is measured as the number of characters of the maximum digit width of the numbers 0~9 as rendered in the normal style's font.
      • getViewColumnWidthPixel

        function getViewColumnWidthPixel(column)
        Get the width in different view type.
        Parameters:
        column: Number - The column index.
        Returns:
        the column width in unit of pixels
      • setViewColumnWidthPixel

        function setViewColumnWidthPixel(column, pixels)
        Sets the width of the column in different view. If the current view type is ViewType.PAGE_LAYOUT_VIEW, the column's width is same as printed width.
        Parameters:
        column: Number - The column index.
        pixels: Number - The width in unit of pixels.