public class XSSFFirstHeader extends XSSFHeaderFooter implements Header
First page header content. Corresponds to first printed page. The first logical page in the sheet may not be printed, for example, if the print area is specified to be a range such that it falls outside the first page's scope.
The first page header is activated by the "Different First" Header/Footer property for the sheet. If this property is not set, the first page header is ignored.
Creating a first page header or footer sets this property by default, so all you need to do to get an first page header or footer to display is to create one. Likewise, if both the first page header and footer are usnset, then this property is unset, and the first page header and footer are ignored.
(第一页标题内容。对应于打印的第一页。例如,如果将打印区域指定为超出第一页范围的范围,则可能不会打印工作表中的第一个逻辑页。第一页页眉由工作表的“不同的第一个”页眉/页脚属性激活。如果未设置此属性,则忽略第一个页眉。默认情况下,创建首页页眉或页脚会设置此属性,因此您需要做的就是创建一个要显示的首页页眉或页脚。同样,如果首页页眉和页脚都未设置,则取消设置此属性,并且忽略首页页眉和页脚。)Modifier | Constructor and Description |
---|---|
protected |
XSSFFirstHeader(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
Create an instance of XSSFFirstHeader from the supplied XML bean
(从提供的 XML bean 创建 XSSFFirstHeader 的实例)
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getText()
Get the content text representing this header
(获取表示此标头的内容文本)
|
void |
setText(java.lang.String text)
Set a text for the header.
(为标题设置文本。)
|
areFieldsStripped, getCenter, getHeaderFooter, getLeft, getRight, getValue, setAreFieldsStripped, setCenter, setLeft, setRight, stripFields
protected XSSFFirstHeader(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
headerFooter
-
(页眉页脚 -)
XSSFSheet.getFirstHeader()
public java.lang.String getText()
getText
in class
XSSFHeaderFooter
(XSSFHeaderFooter 类中的 getText)
public void setText(java.lang.String text)
setText
in class
XSSFHeaderFooter
(XSSFHeaderFooter 类中的 setText)
text
- - a string representing the header.
(text - - 表示标题的字符串。)
to see how to create a string with Header/Footer Formatting Syntax
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.