此内容没有您所选择的语言版本。

19.4. Worksheets


Worksheets are the children of workbooks and the parent of columns and worksheet commands. They can also contain explicitly placed cells, formulas, images and hyperlinks. They are the pages that make up the workbook.
Expand
<e:worksheet>
  • value — An EL-expression string to the backing data. The target of this expression is examined for an Iterable. If the target is a Map, the iteration is done over the Map.Entry entrySet(), so use a .key or .value to target in your references.
  • var — The current row iterator variable name to be referenced in cell value attributes. The value is a string.
  • name — The name of the worksheet. The value is a string. Defaults to Sheet<replaceable>#</replaceable> where # is the worksheet index. If the given worksheet name exists, that sheet is selected. This can be used to merge several data sets into a single worksheet by defining each worksheet with the same name — use startRow and startCol to make sure they do not occupy the same space.
  • startRow — A number value that defines the starting row for the data. This is used to position data from places other than the upper-left corner. This is particularly useful when using multiple data sets for a single worksheet. The default value is 0.
  • startColumn — A number value that defines the starting column for the data. This is used to position data from places other than the upper-left corner. This is particularly useful when using multiple data sets for a single worksheet. The default value is 0.
  • automaticFormulaCalculation — A Boolean determining whether formulas are calculated automatically.
  • bottomMargin — A number value determining the bottom margin in inches.
  • copies — A number value determining the number of copies.
  • defaultColumnWidth — A number value defining the default column width, in characters * 256.
  • defaultRowHeight — A number value defining the default row height, in 1/20ths of a point.
  • displayZeroValues — A Boolean determining whether zero values are displayed.
  • fitHeight — A number value defining the number of pages vertically that this sheet will print into.
  • fitToPages — A Boolean determining whether printing fits to pages.
  • fitWidth — A number value defining the number of pages across that this sheet will print into.
  • footerMargin — A number value defining the margin for any page footer in inches.
  • headerMargin — A number value defining the margin for any page header in inches.
  • hidden — A Boolean determining whether the worksheet is hidden.
  • horizontalCentre — A Boolean determining whether the worksheet is centred horizontally.
  • horizontalFreeze — A number value defining the column at which the pane is frozen horizontally.
  • horizontalPrintResolution — A number value defining the horizontal print resolution.
  • leftMargin — A number value defining the left margin in inches.
  • normalMagnification — A number value defining the normal magnification factor as a percentage. This is not the zoom or scale factor.
  • orientation — A string value that determines the paper orientation when this sheet is printed. Can be either landscape or portrait.
  • pageBreakPreviewMagnification — A number value defining the page break preview magnification factor as a percentage.
  • pageBreakPreviewMode — A Boolean determining whether the page is shown in preview mode.
  • pageStart — A number value defining the page number at which to commence printing.
  • paperSize — A string value determining the paper size to be used when printing. Possible values are a4, a3, letter, legal, etc. For a full list, see jxl.format.PaperSize.
  • password — A string value determining the password for this sheet.
  • passwordHash — A string value determining the password hash. This is used only when copying sheets.
  • printGridLines — A Boolean determining whether grid lines are printed.
  • printHeaders — A Boolean determining whether headers are printed.
  • sheetProtected — A Boolean determining whether the sheet is read-only.
  • recalculateFormulasBeforeSave — A Boolean determining whether formulas are recalculated when the sheet is saved. The default value is false.
  • rightMargin — A number value defining the right margin in inches.
  • scaleFactor — A number value defining the scale factor (as a percentage) used when this sheet is printed.
  • selected — A Boolean value determining whether the sheet is selected automatically when the workbook opens.
  • showGridLines — A Boolean determining whether grid lines are shown.
  • topMargin — A number value defining the top margin in inches.
  • verticalCentre — A Boolean determining whether the sheet is vertically centred.
  • verticalFreeze — A number value determining the row at which the pane is frozen vertically.
  • verticalPrintResolution — A number value determining the vertical print resolution.
  • zoomFactor — A number value determining the zoom factor. This relates to on-screen view, and should not be confused with the scale factor.
Child elements
Facets
  • header— Contents placed at the top of the data block, above the column headers (if any).
  • footer— Contents placed at the bottom of the data block, below the column footers (if any).
 
<e:workbook> 
  <e:worksheet name="foo" startColumn="1" startRow="1"> 
    <e:column value="#{personList}" var="person"> 
      <f:facet name="header"> 
        <e:cell value="Last name"/> 
      </f:facet> 
      <e:cell value="#{person.lastName}"/> 
    </e:column> 
  </e:worksheet> 
<e:workbook>
Copy to Clipboard Toggle word wrap
This defines a worksheet with the name "foo", starting at B2.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat