XlsFile.GetPageHeaderOrFooterAsHtml Method
Converts a section of a page header or footer into an HTML string.
Syntax
Namespace: FlexCel.XlsAdapter
public override String GetPageHeaderOrFooterAsHtml(String section, String imageTag, Int32 pageNumber, Int32 pageCount, THtmlVersion htmlVersion, Encoding encoding, IHtmlFontEvent onFont)
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| section | String | Text to convert. You will normally get this parameter calling ExcelFile.FillPageHeaderOrFooter | |
| imageTag | String | Tag to call an image for the section. It must be in the form: "<img src=...>" and you can get the image with ExcelFile.GetHeaderOrFooterImage(THeaderAndFooterKind, THeaderAndFooterPos, TXlsImgType) . If null or empty, no img tag will be present in the resulting HTML, even if the section includes an image. | |
| pageNumber | Int32 | Page we are printing. This parameter will be used if you have text like "Page 1 of 3" in the header. If you are exporting to HTML, this value should be 1, since there are no page breaks in an HTML doc. |
|
| pageCount | Int32 | Number of pages in the document. This parameter will be used if you have text like "Page 1 of 3" in the header. If you are exporting to HTML, this value should be 1, since there are no page breaks in an HTML doc |
|
| htmlVersion | THtmlVersion | Version of HTML we are targeting. In HTML 4 <br> is valid and <br/> is not. In XHtml the inverse is true. | |
| encoding | Encoding | Code page used to encode the string. Normally this is UTF-8 | |
| onFont | IHtmlFontEvent | Method that can customize the fonts used in the resulting string. It can be null if you don't want to do any modification to the fonts. |
Returns
An HTML string with the section.