asposecells.api

Represents a single row in a worksheet.

Property Getters/Setters Summary
methodgetFirstCell()
Gets the first cell object in the row.
methodgetFirstDataCell()
Gets the first non-blank cell in the row.
methodgetGroupLevel()
method
           Gets the group level of the row.
methodhasCustomStyle()
Indicates whether this row has custom style settings(different from the default one inherited from workbook).
methodgetHeight()
method
setHeight(value)
           Gets and sets the row height in unit of Points.
methodgetIndex()
Gets the index of this row.
methodisBlank()
Indicates whether the row contains any data
methodisCollapsed()
method
           whether the row is collapsed
methodisHeightMatched()
method
           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.
methodisHidden()
method
setHidden(value)
           Indicates whether the row is hidden.
methodgetLastCell()
Gets the last cell object in the row.
methodgetLastDataCell()
Gets the last non-blank cell in the row.
methodget(column)
Gets the cell.
 
Method Summary
methodapplyStyle(style, flag)
Applies formats for a whole row.
methodcopySettings(source, checkStyle)
Copy settings of row, such as style, height, visibility, ...etc.
methodequals(row)
Checks whether this object refers to the same row with another row object.
methodequals(obj)
Checks whether this object refers to the same row with another.
methodgetCellByIndex(index)
Get the cell by specific index in the cells collection of this row.
methodgetCellOrNull(column)
Gets the cell or null in the specific index.
methodgetStyle()
Gets the style of this row.
methoditerator()
Gets the cells enumerator
methodsetStyle(style)
Sets the style of this row.
 

    • Property Getters/Setters Detail

      • isBlank : boolean 

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

        boolean isCollapsed() / setCollapsed(value)
        
        whether the row is collapsed
      • getHeight/setHeight : float 

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

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

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

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

        boolean isHeightMatched() / 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 

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

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

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

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

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

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

      • getCellByIndex

        Cell 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: int - The index(position) of the cell in the cells collection of this row.
        Returns:
        The Cell object at given position.
      • iterator

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

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

        Style 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

         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

         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

         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

        boolean 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

        boolean 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.