Namespace EasyXLS

Class ExcelSheet

System.Object
EasyXLS.BIFF_Records.SheetStream
EasyXLS.ExcelSheet
Direct Known Subclasses:
ExcelChartSheet, ExcelWorksheet, UnknownSheet

public abstract class ExcelSheet extends EasyXLS.BIFF_Records.SheetStream
This class simulates a sheet. It can be a worksheet or a chart.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Defines an instance of the sheet.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract ExcelSheet
    Creates and returns a copy of this object.
    void
    Disposes any resources that it has allocated.
    void
    Adds the specified image to the sheet.
    void
    easy_addImage​(System.String path)
    Adds an image that has the specified path to the sheet.
    This method is overridden as easy_addImage_2 in COM+ version of EasyXLS.
    easy_getImage​(System.String path)
    Returns the image that has the specified path.
    easy_getImageAt​(int index)
    Returns the image from the specified index.
    void
    easy_removeImage​(int index)
    Removes the image from the specified index.
    void
    easy_removeImage​(System.String path)
    Removes the image that has the specified path from the sheet.
    This method is overridden as easy_removeImage_2 in COM+ version of EasyXLS.
    short[]
    Returns the password hash used to verify the sheet password.
    System.String
    Returns the name of the sheet.
    System.Drawing.Color
    Returns the tab color.
    Returns the tab color.
    int
    Returns the zoom of the sheet.
    int
    Returns the number of images in the sheet.
    bool
    Returns the hidden option of the sheet.
    bool
    Returns the protected option of the sheet.
    bool
    Returns the selected option of the sheet.
    void
    setHashedPassword​(System.String hashedPassword)
    Sets the password hash used to verify the sheet password.
    void
    setHidden​(bool isHidden)
    Sets the hidden option of the sheet.
    void
    setProtectionPassword​(System.String password)
    Sets the password to protect the sheet.
    void
    setSheetName​(System.String sheetName)
    Sets the name of the sheet.
    void
    setSheetProtected​(bool isSheetProtected)
    Sets the protected option of the sheet.
    void
    setSheetSelected​(bool isSheetSelected)
    Sets the selected option of the sheet.
    void
    setTabColor​(ThemeColor colorTab)
    Sets the tab color.
    This method is overridden as setTabColor_2 in COM+ version of EasyXLS.
    void
    setTabColor​(System.Drawing.Color colorTab)
    Sets the tab color.
    void
    setZoom​(int zoom)
    Sets the zoom of the sheet.

    Methods inherited from class EasyXLS.BIFF_Records.SheetStream

    biffList, BIFFsLength, RestoreDefaults

    Methods inherited from class System.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExcelSheet

      public ExcelSheet()
      Defines an instance of the sheet.
  • Method Details

    • IsSheetSelected

      public bool IsSheetSelected()
      Returns the selected option of the sheet.
      Returns:
      true if this ExcelSheet is selected.
      See Also:
      setSheetSelected(bool)
    • setSheetSelected

      public void setSheetSelected(bool isSheetSelected)
      Sets the selected option of the sheet.
      Parameters:
      isSheetSelected - true if the sheet is selected, false otherwise
      See Also:
      IsSheetSelected()
    • setZoom

      public void setZoom(int zoom)
      Sets the zoom of the sheet.
      Parameters:
      zoom - the zoom of the sheet.
      See Also:
      getZoom()
    • getZoom

      public int getZoom()
      Returns the zoom of the sheet.
      Returns:
      the zoom of the sheet
      See Also:
      setZoom(int)
    • IsSheetProtected

      public bool IsSheetProtected()
      Returns the protected option of the sheet.
      Returns:
      true if this ExcelSheet is protected.
      See Also:
      setSheetProtected(bool)
    • setSheetProtected

      public void setSheetProtected(bool isSheetProtected)
      Sets the protected option of the sheet.
      Parameters:
      isSheetProtected - true if the sheet is protected, false otherwise
      See Also:
      IsSheetProtected()
    • setProtectionPassword

      public void setProtectionPassword(System.String password)
      Sets the password to protect the sheet.
      Parameters:
      password - the password to protect the sheet
      See Also:
      IsSheetProtected()
    • getHashedPassword

      public short[] getHashedPassword()
      Returns the password hash used to verify the sheet password. Internal use only.
      Returns:
      the password hash used to verify the sheet password
      See Also:
      setHashedPassword(System.String)
    • setHashedPassword

      public void setHashedPassword(System.String hashedPassword)
      Sets the password hash used to verify the sheet password. Internal use only.
      Parameters:
      hashedPassword - the password hash used to verify the sheet password
      See Also:
      getHashedPassword()
    • IsHidden

      public bool IsHidden()
      Returns the hidden option of the sheet.
      Returns:
      true if this ExcelSheet is hidden.
      See Also:
      setHidden(bool)
    • setHidden

      public void setHidden(bool isHidden)
      Sets the hidden option of the sheet.
      Parameters:
      isHidden - true if the sheet is selected, false otherwise
      See Also:
      IsHidden()
    • getSheetName

      public System.String getSheetName()
      Returns the name of the sheet.
      Returns:
      the name of the sheet.
      See Also:
      setSheetName(System.String)
    • setSheetName

      public void setSheetName(System.String sheetName)
      Sets the name of the sheet.
      Parameters:
      sheetName - the name of the sheet
      See Also:
      getSheetName()
    • getTabColor

      public System.Drawing.Color getTabColor()
      Returns the tab color.
      Returns:
      the tab color.
      See Also:
      setTabColor(Color)
    • getTabThemeColor

      public ThemeColor getTabThemeColor()
      Returns the tab color.
      Returns:
      the tab color.
      See Also:
      setTabColor(ThemeColor)
    • setTabColor

      public void setTabColor(ThemeColor colorTab)
      Sets the tab color.
      This method is overridden as setTabColor_2 in COM+ version of EasyXLS.
      Parameters:
      colorTab - the tab color
      See Also:
      getTabThemeColor()
    • setTabColor

      public void setTabColor(System.Drawing.Color colorTab)
      Sets the tab color.
      Parameters:
      colorTab - the tab color
      See Also:
      getTabColor()
    • easy_addImage

      public void easy_addImage(ExcelImage xlsImage)
      Adds the specified image to the sheet.
      Parameters:
      xlsImage - the image to be added
      See Also:
      easy_removeImage(int), easy_getImageAt(int), ImageCount()
    • easy_addImage

      public void easy_addImage(System.String path)
      Adds an image that has the specified path to the sheet.
      This method is overridden as easy_addImage_2 in COM+ version of EasyXLS.
      Parameters:
      path - the file path to image file
      See Also:
      easy_removeImage(int), easy_getImageAt(int), ImageCount()
    • easy_removeImage

      public void easy_removeImage(int index)
      Removes the image from the specified index.
      Parameters:
      index - the index of the image to remove
      See Also:
      easy_addImage(EasyXLS.Drawings.ExcelImage), easy_getImageAt(int), ImageCount(), easy_removeImage(String)
    • easy_removeImage

      public void easy_removeImage(System.String path)
      Removes the image that has the specified path from the sheet.
      This method is overridden as easy_removeImage_2 in COM+ version of EasyXLS.
      Parameters:
      path - the file path to image file
      See Also:
      easy_addImage(EasyXLS.Drawings.ExcelImage), easy_getImageAt(int), ImageCount(), easy_removeImage(int)
    • easy_getImageAt

      public ExcelImage easy_getImageAt(int index)
      Returns the image from the specified index.
      Parameters:
      index - the index of the image to return
      Returns:
      the image from the specified index
      See Also:
      easy_addImage(EasyXLS.Drawings.ExcelImage), easy_removeImage(int), ImageCount(), easy_getImage(String)
    • easy_getImage

      public ExcelImage easy_getImage(System.String path)
      Returns the image that has the specified path.
      Parameters:
      path - the file path to image file
      Returns:
      the image that has the specified path
      See Also:
      easy_addImage(EasyXLS.Drawings.ExcelImage), easy_removeImage(int), ImageCount(), easy_getImageAt(int)
    • ImageCount

      public int ImageCount()
      Returns the number of images in the sheet.
      Returns:
      the number of images in the sheet
      See Also:
      easy_addImage(EasyXLS.Drawings.ExcelImage), easy_removeImage(int), easy_getImageAt(int)
    • Dispose

      public void Dispose()
      Disposes any resources that it has allocated.
      Overrides:
      Dispose in class EasyXLS.BIFF_Records.SheetStream
    • Clone

      public abstract ExcelSheet Clone()
      Creates and returns a copy of this object.
      Returns:
      a clone of this instance.