Namespace EasyXLS
Class ExcelHeader
System.Object
EasyXLS.ExcelHeader
public class ExcelHeader
extends System.Object
This class stores the header information extends text, position (left, center, or right), font name, font size, underline, strikethrough, superscript, subscript, page number, the number of pages, date and time, file name.
-
Constructor Summary
ConstructorDescriptionDefines an instance of the header.ExcelHeader(System.String text, System.String position)
Defines an instance of the header having the specified text and position.ExcelHeader(System.String text, System.String position, System.String fontName, int fontSize, bool isBold, bool isItalic)
Defines an instance of the header having the specified text, position and font settings. -
Method Summary
Modifier and TypeMethodDescriptionClone()
Creates and returns a copy of this object.System.String
Returns the header expression.System.String
Returns the position of the header.void
Sets the bold style for the values that will follow the insertion.void
Appends the date to header expression.void
Sets the double underline style for the values that will follow the insertion.void
Appends the enter character to header expression.void
Appends the file name to header expression.void
InsertFont(System.String fontType)
Sets the font type for the values that will follow the font insertion.void
InsertFontSize(int fontSize)
Sets the font size for the values that will follow the font size insertion.void
Sets the italic style for the values that will follow the insertion.void
Appends the page number to header expression.void
Appends the total number of pages to header expression.void
Sets the single underline style for the values that will follow the insertion.void
Sets the strikethrough style for the values that will follow the insertion.void
Sets the subscript style for the values that will follow the insertion.void
Sets the superscript style for the values that will follow the insertion.void
Appends the tab character to header expression.void
Appends the date time to header expression.void
InsertValue(System.String value)
Appends a string to header expression.void
Removes the bold style for the values that will follow the insertion.void
Removes the double underline style for the values that will follow the insertion.void
Removes the italic style for the values that will follow the insertion.void
Removes the single underline style for the values that will follow the insertion.void
Removes the strikethrough style for the values that will follow the insertion.void
Removes the subscript style for the values that will follow the insertion.void
Removes the superscript style for the values that will follow the insertion.void
Reset()
Clears the header expression.void
setHeaderString(System.String text)
Sets the header expression.void
setPosition(System.String position)
Sets the position of the header.Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExcelHeader
public ExcelHeader()Defines an instance of the header. -
ExcelHeader
public ExcelHeader(System.String text, System.String position)Defines an instance of the header having the specified text and position.- Parameters:
text
- the text from the headerposition
- the position of the header. Possible values are available inHeader
class.
-
ExcelHeader
public ExcelHeader(System.String text, System.String position, System.String fontName, int fontSize, bool isBold, bool isItalic)Defines an instance of the header having the specified text, position and font settings.- Parameters:
text
- the text from the headerposition
- the position of the header. Possible values are available inHeader
class.fontName
- the font name of the headerfontSize
- the font size of the headerisBold
- the bold option of the headerisItalic
- the italic option of header
-
-
Method Details
-
getHeaderString
public System.String getHeaderString()Returns the header expression.- Returns:
- the header expression
- See Also:
setHeaderString(System.String)
-
setHeaderString
public void setHeaderString(System.String text)Sets the header expression.- Parameters:
text
- the header expression- See Also:
getHeaderString()
-
getPosition
public System.String getPosition()Returns the position of the header. Possible values are available inHeader
class.- Returns:
- the position of the header
- See Also:
setPosition(System.String)
-
setPosition
public void setPosition(System.String position)Sets the position of the header. Possible values are available inHeader
class.- Parameters:
position
- the position of the header- See Also:
getPosition()
-
InsertValue
public void InsertValue(System.String value)Appends a string to header expression.- Parameters:
value
- the value to be inserted
-
InsertFont
public void InsertFont(System.String fontType)Sets the font type for the values that will follow the font insertion.- Parameters:
fontType
- the font type
-
InsertFontSize
public void InsertFontSize(int fontSize)Sets the font size for the values that will follow the font size insertion.- Parameters:
fontSize
- the font size
-
InsertSingleUnderline
public void InsertSingleUnderline()Sets the single underline style for the values that will follow the insertion.- See Also:
RemoveSingleUnderline()
-
RemoveSingleUnderline
public void RemoveSingleUnderline()Removes the single underline style for the values that will follow the insertion.- See Also:
InsertSingleUnderline()
-
InsertDoubleUnderline
public void InsertDoubleUnderline()Sets the double underline style for the values that will follow the insertion.- See Also:
RemoveDoubleUnderline()
-
RemoveDoubleUnderline
public void RemoveDoubleUnderline()Removes the double underline style for the values that will follow the insertion.- See Also:
InsertDoubleUnderline()
-
InsertStrikethrough
public void InsertStrikethrough()Sets the strikethrough style for the values that will follow the insertion.- See Also:
RemoveStrikethrough()
-
RemoveStrikethrough
public void RemoveStrikethrough()Removes the strikethrough style for the values that will follow the insertion.- See Also:
InsertStrikethrough()
-
InsertSuperscript
public void InsertSuperscript()Sets the superscript style for the values that will follow the insertion.- See Also:
RemoveSuperscript()
-
RemoveSuperscript
public void RemoveSuperscript()Removes the superscript style for the values that will follow the insertion.- See Also:
InsertSuperscript()
-
InsertSubscript
public void InsertSubscript()Sets the subscript style for the values that will follow the insertion.- See Also:
RemoveSubscript()
-
RemoveSubscript
public void RemoveSubscript()Removes the subscript style for the values that will follow the insertion.- See Also:
InsertSubscript()
-
InsertBold
public void InsertBold()Sets the bold style for the values that will follow the insertion.- See Also:
RemoveBold()
-
RemoveBold
public void RemoveBold()Removes the bold style for the values that will follow the insertion.- See Also:
InsertBold()
-
InsertItalic
public void InsertItalic()Sets the italic style for the values that will follow the insertion.- See Also:
RemoveItalic()
-
RemoveItalic
public void RemoveItalic()Removes the italic style for the values that will follow the insertion.- See Also:
InsertItalic()
-
InsertPage
public void InsertPage()Appends the page number to header expression. -
InsertPages
public void InsertPages()Appends the total number of pages to header expression. -
InsertDate
public void InsertDate()Appends the date to header expression. -
InsertTime
public void InsertTime()Appends the date time to header expression. -
InsertFile
public void InsertFile()Appends the file name to header expression. -
InsertTab
public void InsertTab()Appends the tab character to header expression. -
InsertEnter
public void InsertEnter()Appends the enter character to header expression. -
Reset
public void Reset()Clears the header expression. -
Clone
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-