Table of Contents

ExcelFile.SetHeaderOrFooterImage Method

Overloads

ExcelFile.SetHeaderOrFooterImage(THeaderAndFooterKind, THeaderAndFooterPos, Byte[], THeaderOrFooterImageProperties)

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

Namespace: FlexCel.Core

public void SetHeaderOrFooterImage(THeaderAndFooterKind headerAndFooterKind, THeaderAndFooterPos section, Byte[] data, THeaderOrFooterImageProperties properties)

Parameters

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

See also

ExcelFile.SetHeaderOrFooterImage(THeaderAndFooterKind, THeaderAndFooterPos, Byte[], TXlsImgType, THeaderOrFooterImageProperties)

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

Namespace: FlexCel.Core

public abstract void SetHeaderOrFooterImage(THeaderAndFooterKind headerAndFooterKind, THeaderAndFooterPos section, Byte[] data, TXlsImgType imageType, THeaderOrFooterImageProperties properties)

Parameters

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

See also