Table of Contents

TExcelFile.SetHeaderOrFooterImage Method

Overloads

TExcelFile.SetHeaderOrFooterImage(THeaderAndFooterKind, THeaderAndFooterPos, TBytes, IHeaderOrFooterImageProperties)

This method sets the image associated to a given section of the header or footer. There can be only one image per section, and you refer it from the header string (see PageHeader and PageFooter) by writing &G. NOTE THAT YOU CAN ONLY USE HEADER AND FOOTER GRAPHICS ON EXCEL XP AND NEWER. Excel 2000 and 97 will still open the file, but they will show no graphics. ALSO, NOTE that only setting the image will not display it. You need to write &G in the corresponding PageHeader or PageFooter This methods will try to automatically guess/convert the image type of the data to the better fit.

Syntax

Unit: FlexCel.Core

procedure TExcelFile.SetHeaderOrFooterImage(const headerAndFooterKind: THeaderAndFooterKind; const section: THeaderAndFooterPos; data: TBytes; properties: IHeaderOrFooterImageProperties); overload;

Parameters

<-> Parameter Type Description
const headerAndFooterKind THeaderAndFooterKind Type of page for which we want to set the image. You will normally get this value from THeaderAndFooter.GetHeaderAndFooterKind.
const section THeaderAndFooterPos Section of the header or footer for which we want to set the image.
data TBytes Image data.
properties IHeaderOrFooter​Image​Properties Image Size.

See also

TExcelFile.SetHeaderOrFooterImage(THeaderAndFooterKind, THeaderAndFooterPos, TBytes, TXlsImgType, IHeaderOrFooterImageProperties)

This method sets the image associated to a given section of the header or footer. There can be only one image per section, and you refer it from the header string (see PageHeader and PageFooter) by writing &G. NOTE THAT YOU CAN ONLY USE HEADER AND FOOTER GRAPHICS ON EXCEL XP AND NEWER. Excel 2000 and 97 will still open the file, but they will show no graphics. ALSO, NOTE that only setting the image will not display it. You need to write &G in the corresponding PageHeader or PageFooter

Syntax

Unit: FlexCel.Core

procedure TExcelFile.SetHeaderOrFooterImage(const headerAndFooterKind: THeaderAndFooterKind; const section: THeaderAndFooterPos; const data: TBytes; const imageType: TXlsImgType; properties: IHeaderOrFooterImageProperties); overload; virtual; abstract;

Parameters

<-> Parameter Type Description
const headerAndFooterKind THeaderAndFooterKind Type of page for which we want to set the image. You will normally get this value from THeaderAndFooter.GetHeaderAndFooterKind.
const section THeaderAndFooterPos Section of the header or footer for which we want to set the image.
const data TBytes Image data.
const imageType TXlsImgType The image type for the data sent. (If it is a bmp, jpg or other)
properties IHeaderOrFooter​Image​Properties Image size.

See also