Namespace EasyXLS.Drawings

Class ExcelImage


public class ExcelImage extends DrawingObject2D
This class stores image information like image path and position in worksheet.
  • Constructor Details

    • ExcelImage

      public ExcelImage()
      Defines an instance of the image.
    • ExcelImage

      public ExcelImage(System.String path)
      Defines an instance of the image having the specified path.
      Parameters:
      path - the file path to image file
    • ExcelImage

      public ExcelImage(System.String path, int row, int column)
      Defines an instance of the image having the specified path and location
      This constructor is applicable only to adding images to ExcelWorksheet objects
      Parameters:
      path - the file path to image file
      row - the row number where the left upper corner of the image is anchored
      column - the column number where the left upper corner of the image is anchored
    • ExcelImage

      public ExcelImage(System.String path, int row, int column, int width, int height)
      Defines an instance of the image having the specified path, location and size
      This constructor is applicable only to adding images to ExcelWorksheet objects
      Parameters:
      path - the file path to image file
      row - the row number where the left upper corner of the image is anchored
      column - the column number where the left upper corner of the image is anchored
      width - the image width
      height - the image height
    • ExcelImage

      public ExcelImage(System.String path, System.String position)
      Defines an instance of the image having the specified path and location
      This constructor is applicable only to adding images to ExcelWorksheet objects
      Parameters:
      path - the file path to image file
      position - the cell reference where the left upper corner of the image is anchored
    • ExcelImage

      public ExcelImage(System.String path, System.String position, int width, int height)
      Defines an instance of the image having the specified path, location and size
      This constructor is applicable only to adding images to ExcelWorksheet objects
      Parameters:
      path - the file path to image file
      position - the cell reference where the left upper corner of the image is anchored
      width - the image width
      height - the image height
  • Method Details

    • getBSEImage

      public EasyXLS.BIFF_Records.Drawing_Records.BSE getBSEImage()
      Internal use only. Returns the BSE record.
      Returns:
      the BSE record
      See Also:
      setBSEImage(EasyXLS.BIFF_Records.Drawing_Records.BSE)
    • setBSEImage

      public void setBSEImage(EasyXLS.BIFF_Records.Drawing_Records.BSE image)
      Internal use only. Sets the BSE record.
      Parameters:
      image - the BSE record
      See Also:
      getBSEImage()
    • getImagePath

      public System.String getImagePath()
      Returns the file path to image file.
      Returns:
      the file path to image file
      See Also:
      setImagePath(System.String)
    • setImagePath

      public void setImagePath(System.String path)
      Sets the file path to image file.
      Parameters:
      path - the file path to image file
      See Also:
      getImagePath()
    • getImageBytes

      public byte[] getImageBytes()
      Returns a byte array that represents the image. The image is available only if the Excel file containing the image was previously loaded or after the Excel file was written.
      Returns:
      a byte array that represents the imag
    • Clone

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