Table of Contents

TXlsFile.SetHeaderOrFooterImage Method

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 TExcelFile.PageHeader and TExcelFile.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 TExcelFile.PageHeader or TExcelFile.PageFooter

Syntax

Unit: FlexCel.XlsAdapter

procedure TXlsFile.SetHeaderOrFooterImage(const headerAndFooterKind: THeaderAndFooterKind; const section: THeaderAndFooterPos; const data: TBytes; const imageType: TXlsImgType; properties: IHeaderOrFooterImageProperties); overload; override;

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