XlsFile.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 ExcelFile.PageHeader and ExcelFile.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 ExcelFile.PageHeader or ExcelFile.PageFooter
Syntax
Namespace: FlexCel.XlsAdapter
public override 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 | THeaderOrFooterImageProperties | Image size. |