Namespace EasyXLS

Class 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

      Constructors 
      Constructor Description
      ExcelHeader()
      Defines 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 Type Method Description
      ExcelHeader Clone()
      Creates and returns a copy of this object.
      System.String getHeaderString()
      Returns the header expression.
      System.String getPosition()
      Returns the position of the header.
      void InsertBold()
      Sets the bold style for the values that will follow the insertion.
      void InsertDate()
      Appends the date to header expression.
      void InsertDoubleUnderline()
      Sets the double underline style for the values that will follow the insertion.
      void InsertEnter()
      Appends the enter character to header expression.
      void InsertFile()
      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 InsertItalic()
      Sets the italic style for the values that will follow the insertion.
      void InsertPage()
      Appends the page number to header expression.
      void InsertPages()
      Appends the total number of pages to header expression.
      void InsertSingleUnderline()
      Sets the single underline style for the values that will follow the insertion.
      void InsertStrikethrough()
      Sets the strikethrough style for the values that will follow the insertion.
      void InsertSubscript()
      Sets the subscript style for the values that will follow the insertion.
      void InsertSuperscript()
      Sets the superscript style for the values that will follow the insertion.
      void InsertTab()
      Appends the tab character to header expression.
      void InsertTime()
      Appends the date time to header expression.
      void InsertValue​(System.String value)
      Appends a string to header expression.
      void RemoveBold()
      Removes the bold style for the values that will follow the insertion.
      void RemoveDoubleUnderline()
      Removes the double underline style for the values that will follow the insertion.
      void RemoveItalic()
      Removes the italic style for the values that will follow the insertion.
      void RemoveSingleUnderline()
      Removes the single underline style for the values that will follow the insertion.
      void RemoveStrikethrough()
      Removes the strikethrough style for the values that will follow the insertion.
      void RemoveSubscript()
      Removes the subscript style for the values that will follow the insertion.
      void RemoveSuperscript()
      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.
    • Constructor Detail

      • 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 header
        position - the position of the header. Possible values are available in Header 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 header
        position - the position of the header. Possible values are available in Header class.
        fontName - the font name of the header
        fontSize - the font size of the header
        isBold - the bold option of the header
        isItalic - the italic option of header
    • Method Detail

      • 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 in Header 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 in Header 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

        public ExcelHeader Clone()
        Creates and returns a copy of this object.
        Returns:
        a clone of this instance.