Release 1.6.1 29 June 2005 |
Developer's reference |
![]() |
Reference > N_XLS_WORKSHEET > Header and footer string |
Header and footer string
The header and footer is a combination of plain text and control characters.
Control | Description |
&L | Left justification |
&C | Center justification |
&R | Right justification |
&P | Page number |
&N | Total number of pages |
&D | Date |
&T | Time |
&F | File name |
&A | Worksheet name |
&fontsize | Font size |
&"font,style" | Font name and style |
&U | Single underline |
&E | Double underline |
&S | Strikethrough |
&X | Superscript |
&Y | Subscript |
&& | Literal ampersand & |
Text in headers and footers can be justified (aligned) to the left, center and right by prefixing the text with the control characters &L, &C and &R.
For example:
worksheet1.of_set_header( '&RHeader', 0.50 ) //Header justified to the right worksheet2.of_set_header( '&LHeader', 0.50 ) //Header justified to the left worksheet3.of_set_header( '&CHeader', 0.50 ) //Header justified to the center
For simple text, if you do not specify any justification the text will be centred. However, you must prefix the text with &C if you specify a font name or any other formatting.
You can have text in each of the justification regions:
worksheet.of_set_header( '&Rright text&Ccenter text&Lleft text', 0.50 )
You can specify the font size of a section of the text by prefixing it with the control character &n where n is the font size:
worksheet1.of_set_header('&L&40Big header', 0.50 ) worksheet2.of_set_header('&L&9Small header', 0.50 )
You can specify the font of a section of the text by prefixing it with the control sequence &"font,style" where font is a font name such as "Arial" or "Times New Roman" and style is one of the standard Windows font descriptions: "Regular", "Bold" , "Italic"or "Bold Italic":
worksheet.of_set_header('&L&"Arial,Bold"Header', 0.50 )
© 2003-2005 Desta, Ltd. All rights reserved. | SupportDesk |