SpreadsheetAttachment

Inheritance: java.lang.Object, com.groupdocs.watermark.common.Attachment

All Implemented Interfaces: com.groupdocs.watermark.search.ITwoDObject

public class SpreadsheetAttachment extends Attachment implements ITwoDObject

Represents a file attached to an Excel document.

Methods

Method Description
getContent() Gets the attached file content.
setContent(byte[] value) Sets the attached file content.
getPreviewImageContent() Gets the attached file preview image as a byte array.
setPreviewImageContent(byte[] value) Sets the attached file preview image as a byte array.
isLink() Gets a value indicating whether the content contains only a link to the file.
getSourceFullName() Gets the full name of the attached file.
getAlternativeText() Gets the descriptive (alternative) text associated with the attached file.
setAlternativeText(String value) Sets the descriptive (alternative) text associated with the attached file.
getAsposeOleObject()
getX() Gets the horizontal offset of the attachment frame from worksheet left border in points.
setX(double value) Sets the horizontal offset of the attachment frame from worksheet left border in points.
getY() Gets the vertical offset of the attachment frame from worksheet top border in points.
setY(double value) Sets the vertical offset of the attachment frame from worksheet top border in points.
getWidth() Gets the width of the attachment frame in points.
setWidth(double value) Sets the width of the attachment frame in points.
getHeight() Gets the height of the attachment frame in points.
setHeight(double value) Sets the height of the attachment frame in points.
checkImageType()

getContent()

public byte[] getContent()

Gets the attached file content.

Returns: byte[] - The attached file content.

setContent(byte[] value)

public void setContent(byte[] value)

Sets the attached file content.

Parameters:

Parameter Type Description
value byte[] The attached file content.

getPreviewImageContent()

public final byte[] getPreviewImageContent()

Gets the attached file preview image as a byte array.

Returns: byte[] - The attached file preview image as a byte array.

setPreviewImageContent(byte[] value)

public final void setPreviewImageContent(byte[] value)

Sets the attached file preview image as a byte array.

Parameters:

Parameter Type Description
value byte[] The attached file preview image as a byte array.
public final boolean isLink()

Gets a value indicating whether the content contains only a link to the file.

Returns: boolean - True if the attached file is referenced by a link (the content does not contain attached file content); otherwise, false.

getSourceFullName()

public final String getSourceFullName()

Gets the full name of the attached file.

Returns: java.lang.String - The full name of the attached file.


The extension is used to determine appropriate application to open the file.

getAlternativeText()

public final String getAlternativeText()

Gets the descriptive (alternative) text associated with the attached file.

Returns: java.lang.String - The descriptive (alternative) text associated with the attached file.

setAlternativeText(String value)

public final void setAlternativeText(String value)

Sets the descriptive (alternative) text associated with the attached file.

Parameters:

Parameter Type Description
value java.lang.String The descriptive (alternative) text associated with the attached file.

getAsposeOleObject()

public final OleObject getAsposeOleObject()

Returns: com.aspose.cells.OleObject

getX()

public final double getX()

Gets the horizontal offset of the attachment frame from worksheet left border in points.

Returns: double - The x-coordinate of the attachment frame.

setX(double value)

public final void setX(double value)

Sets the horizontal offset of the attachment frame from worksheet left border in points.

Parameters:

Parameter Type Description
value double The x-coordinate of the attachment frame.

getY()

public final double getY()

Gets the vertical offset of the attachment frame from worksheet top border in points.

Returns: double - The y-coordinate of the attachment frame.

setY(double value)

public final void setY(double value)

Sets the vertical offset of the attachment frame from worksheet top border in points.

Parameters:

Parameter Type Description
value double The y-coordinate of the attachment frame.

getWidth()

public final double getWidth()

Gets the width of the attachment frame in points.

Returns: double - The width of the attachment frame in points.

setWidth(double value)

public final void setWidth(double value)

Sets the width of the attachment frame in points.

Parameters:

Parameter Type Description
value double The width of the attachment frame in points.

getHeight()

public final double getHeight()

Gets the height of the attachment frame in points.

Returns: double - The height of the attachment frame in points.

setHeight(double value)

public final void setHeight(double value)

Sets the height of the attachment frame in points.

Parameters:

Parameter Type Description
value double The height of the attachment frame in points.

checkImageType()

public final void checkImageType()