Search

19.4. Worksheets

download PDF
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.
<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>
This defines a worksheet with the name "foo", starting at B2.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.