## org.apache.poi.hssf.usermodel
Class HSSFHeader

    java.lang.Object
      org.apache.poi.hssf.usermodel.HSSFHeader

public class HSSFHeader
extends java.lang.Object

Class to read and manipulate the header.

The header works by having a left, center, and right side. The total cannot be more that 255 bytes long. One uses this class by getting the HSSFHeader from HSSFSheet and then getting or setting the left, center, and right side. For special things (such as page numbers and date), one can use a the methods that return the characters used to represent these. One can also change the fonts by using similar methods.

Author:
  Shawn Laubach (slaubach at apache dot org)

Constructor Summary
`protected` `HSSFHeader(HeaderRecord headerRecord)` Constructor.

Method Summary
`static java.lang.String` `date()` Returns the string representing the current date
`static java.lang.String` `file()` Returns the string representing the current file name
`static java.lang.String` `font(java.lang.String font, java.lang.String style)` Returns the string that represents the change in font.
`static java.lang.String` `fontSize(short size)` Returns the string that represents the change in font size.
`java.lang.String` `getCenter()` Get the center of the header.
`java.lang.String` `getLeft()` Get the left side of the header.
`java.lang.String` `getRight()` Get the right side of the header.
`static java.lang.String` `numPages()` Returns the string representing the number of pages.
`static java.lang.String` `page()` Returns the string representing the current page number
`void` `setCenter(java.lang.String newCenter)` Sets the center string.
`void` `setLeft(java.lang.String newLeft)` Sets the left string.
`void` `setRight(java.lang.String newRight)` Sets the right string.
`static java.lang.String` `tab()` Returns the string representing the current tab (sheet) name
`static java.lang.String` `time()` Returns the string representing the current time

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HSSFHeader

    protected HSSFHeader(HeaderRecord headerRecord)

  Constructor. Creates a new header interface from a header record

Parameters:
  `headerRecord` - Header record to create the header with

Method Detail

### getLeft

    public java.lang.String getLeft()

  Get the left side of the header.

  Returns:
    The string representing the left side.

### setLeft

    public void setLeft(java.lang.String newLeft)

  Sets the left string.

### getCenter

    public java.lang.String getCenter()

  Get the center of the header.

  Returns:
    The string representing the center.

### setCenter

    public void setCenter(java.lang.String newCenter)

  Sets the center string.

### getRight

    public java.lang.String getRight()

  Get the right side of the header.

  Returns:
    The string representing the right side.

### setRight

    public void setRight(java.lang.String newRight)

  Sets the right string.

### fontSize

    public static java.lang.String fontSize(short size)

  Returns the string that represents the change in font size.

  Parameters:
    `size` - the new font size
  Returns:
    The special string to represent a new font size

### font

    public static java.lang.String font(java.lang.String font,
                                        java.lang.String style)

  Returns the string that represents the change in font.

  Parameters:
    `font` - the new font
    `style` - the fonts style
  Returns:
    The special string to represent a new font size

### page

    public static java.lang.String page()

  Returns the string representing the current page number

  Returns:
    The special string for page number

### numPages

    public static java.lang.String numPages()

  Returns the string representing the number of pages.

  Returns:
    The special string for the number of pages

### date

    public static java.lang.String date()

  Returns the string representing the current date

  Returns:
    The special string for the date

### time

    public static java.lang.String time()

  Returns the string representing the current time

  Returns:
    The special string for the time

### file

    public static java.lang.String file()

  Returns the string representing the current file name

  Returns:
    The special string for the file name

### tab

    public static java.lang.String tab()

  Returns the string representing the current tab (sheet) name

  Returns:
    The special string for tab name

Copyright © 2003 Apache Software Foundation.