aspose.cells

Represents a single row in a worksheet.

Property Getters/Setters Summary
functiongetFirstCell()
Gets the first cell object in the row.
functiongetFirstDataCell()
Gets the first non-blank cell in the row.
functiongetGroupLevel()
function
           Gets the group level of the row.
functionhasCustomStyle()
Indicates whether this row has custom style settings(different from the default one inherited from workbook).
functiongetHeight()
function
setHeight(value)
           Gets and sets the row height in unit of Points.
functiongetIndex()
Gets the index of this row.
functionisBlank()
Indicates whether the row contains any data
functionisCollapsed()
function
           whether the row is collapsed
functionisHeightMatched()
function
           Indicates whether the row height matches current default font setting of the workbook. True of this property also denotes the row height is "automatic" without custom height value set by user.
functionisHidden()
function
setHidden(value)
           Indicates whether the row is hidden.
functiongetLastCell()
Gets the last cell object in the row.
functiongetLastDataCell()
Gets the last non-blank cell in the row.
functionget(column)
Gets the cell.
 
Method Summary
functionapplyStyle(style, flag)
Applies formats for a whole row.
functioncopySettings(source, checkStyle)
Copy settings of row, such as style, height, visibility, ...etc.
functionequals(row)
Checks whether this object refers to the same row with another row object.
functionequals(obj)
Checks whether this object refers to the same row with another.
functiongetCellByIndex(index)
Get the cell by specific index in the cells collection of this row.
functiongetCellOrNull(column)
Gets the cell or null in the specific index.
functiongetStyle()
Gets the style of this row.
functioniterator()
Gets the cells enumerator
functionsetStyle(style)
Sets the style of this row.
 

    • Property Getters/Setters Detail

      • isBlank : boolean 

        function isBlank()
        
        Indicates whether the row contains any data
      • isCollapsed/setCollapsed : boolean 

        function isCollapsed() / function setCollapsed(value)
        
        whether the row is collapsed
      • getHeight/setHeight : Number 

        function getHeight() / function setHeight(value)
        
        Gets and sets the row height in unit of Points.
      • isHidden/setHidden : boolean 

        function isHidden() / function setHidden(value)
        
        Indicates whether the row is hidden.
      • getIndex : Number 

        function getIndex()
        
        Gets the index of this row.
      • getGroupLevel/setGroupLevel : byte 

        function getGroupLevel() / function setGroupLevel(value)
        
        Gets the group level of the row.
      • isHeightMatched/setHeightMatched : boolean 

        function isHeightMatched() / function setHeightMatched(value)
        
        Indicates whether the row height matches current default font setting of the workbook. True of this property also denotes the row height is "automatic" without custom height value set by user. When this property is true, if the content in this row changes, generally the row height needs to be re-calculated(such as by Worksheet.autoFitRows()) to get the same result with what is shown in ms excel when you opening the workbook in it.
      • hasCustomStyle : boolean 

        function hasCustomStyle()
        
        Indicates whether this row has custom style settings(different from the default one inherited from workbook).
      • getFirstCell : Cell 

        function getFirstCell()
        
        Gets the first cell object in the row.
      • getFirstDataCell : Cell 

        function getFirstDataCell()
        
        Gets the first non-blank cell in the row.
      • getLastCell : Cell 

        function getLastCell()
        
        Gets the last cell object in the row.
      • getLastDataCell : Cell 

        function getLastDataCell()
        
        Gets the last non-blank cell in the row.
      • get : Cell 

        function get(column)
        
        Gets the cell.
        Parameters:
        column - The column index
        Returns:
    • Method Detail

      • getCellByIndex

        function getCellByIndex(index)
        Get the cell by specific index in the cells collection of this row. To traverse all cells in sequence without modification, using iterator() will give better performance than using this method to get cell one by one.
        Parameters:
        index: Number - The index(position) of the cell in the cells collection of this row.
        Returns:
        The Cell object at given position.
      • iterator

        function iterator()
        Gets the cells enumerator
        Returns:
        The cells enumerator
      • getCellOrNull

        function getCellOrNull(column)
        Gets the cell or null in the specific index.
        Parameters:
        column: Number - The column index
        Returns:
        Returns the cell object if the cell exists. Or returns null if the cell object does not exist.
      • getStyle

        function getStyle()
        Gets the style of this row. Modifying the returned style object directly takes no effect for this row or any cells in this row. You have to call applyStyle(com.aspose.cells.Style, com.aspose.cells.StyleFlag) or setStyle(com.aspose.cells.Style) method to apply the change to this row.
        Row's style is the style which will be inherited by cells in this row(those cells that have no custom style settings, such as existing cells that have not been set style explicitly, or those that have not been instantiated)
      • setStyle

        function setStyle(style)
        Sets the style of this row. This method only sets the given style as the default style for this row, without changing the style settings for existing cells in this row. To update style settings of existing cells to the specified style at the same time, please use applyStyle(com.aspose.cells.Style, com.aspose.cells.StyleFlag)
        Parameters:
        style: Style - the style to be used as the default style for cells in this row.
      • copySettings

        function copySettings(source, checkStyle)
        Copy settings of row, such as style, height, visibility, ...etc.
        Parameters:
        source: Row - the source row whose settings will be copied to this one
        checkStyle: boolean - whether check and gather style. Only takes effect and be needed when two row objects belong to different workbook and the styles of two workbooks are different.
      • applyStyle

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

        function equals(obj)
        Checks whether this object refers to the same row with another.
        Parameters:
        obj: Object - another object
        Returns:
        true if two objects refers to the same row.
      • equals

        function equals(row)
        Checks whether this object refers to the same row with another row object.
        Parameters:
        row: Row - another row object
        Returns:
        true if two row objects refers to the same row.