Table of Contents

TExcelFile.AddImage Method

Overloads

TExcelFile.AddImage(TUIImage, IImageProperties)

Adds a new image to the active sheet. If you don't have the image already created, prefer using AddImage(TStream, IImageProperties), as it is faster. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Remarks

Saving a WMF or EMF Image is not currently supported by the .NET framework. If you pass a MetaFile to this method, it will be saved as png. For inserting a REAL wmf into excel use AddImage(TStream, IImageProperties)

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(const img: TUIImage; imageProperties: IImageProperties); overload;

Parameters

<-> Parameter Type Description
const img TUIImage Image to insert.
imageProperties IImageProperties Image size/position

See also

TExcelFile.AddImage(TBytes, IImageProperties)

Adds an image to the active sheet. It will try to automatically guess/convert the image type of the data to the better fit. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(data: TBytes; imageProperties: IImageProperties); overload;

Parameters

<-> Parameter Type Description
data TBytes Image data.
imageProperties IImageProperties Image Properties.

See also

TExcelFile.AddImage(TStream, IImageProperties)

Adds an image to the active sheet. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(const aStream: TStream; imageProperties: IImageProperties); overload;

Parameters

<-> Parameter Type Description
const aStream TStream Stream containing the image data.
imageProperties IImageProperties Placement and other properties of the image.

See also

TExcelFile.AddImage(string, IImageProperties)

Adds an image to the active sheet. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(const fileName: string; imageProperties: IImageProperties); overload;

Parameters

<-> Parameter Type Description
const fileName string Name of the file in disk containing the image data.
imageProperties IImageProperties Placement and other properties of the image.

See also

TExcelFile.AddImage(TBytes, TXlsImgType, IImageProperties)

Adds an image to the active sheet. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(const data: TBytes; const imageType: TXlsImgType; imageProperties: IImageProperties); overload; virtual; abstract;

Parameters

<-> Parameter Type Description
const data TBytes byte array with the image data.
const imageType TXlsImgType Type of image you are inserting (bmp, jpg, etc).
imageProperties IImageProperties Placement and other properties of the image.

See also

TExcelFile.AddImage(TStream, TXlsImgType, IImageProperties)

Adds an image to the active sheet. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(const aStream: TStream; const imageType: TXlsImgType; imageProperties: IImageProperties); overload;

Parameters

<-> Parameter Type Description
const aStream TStream Stream containing the image data.
const imageType TXlsImgType Type of image you are inserting (bmp, jpg, etc).
imageProperties IImageProperties Placement and other properties of the image.

See also

TExcelFile.AddImage(Integer, Integer, TUIImage)

Adds a new image to the active sheet. If you don't have the image already created, prefer using AddImage(TStream, IImageProperties), as it is faster. Note that for SVG images, xlsx files store both a PNG and SVG image. To enter an SVG image, use AddImageAlternate

Remarks

Saving a WMF or EMF Image is not currently supported by the .NET framework. If you pass a MetaFile to this method, it will be saved as png. For inserting a REAL wmf into excel use AddImage(TStream, IImageProperties)

Syntax

Unit: FlexCel.Core

procedure TExcelFile.AddImage(const row: Integer; const col: Integer; const img: TUIImage); overload;

Parameters

<-> Parameter Type Description
const row Integer Row Index (1 based)
const col Integer Column Index (1 based)
const img TUIImage Image to insert.

See also