Microsoft Excel output reference for designing templates

Review this information to learn more about generating Microsoft Excel documents with IBM Engineering Lifecycle Optimization - Publishing (PUB).

Purpose

To output the template as an .xls or .xlsx or .xlsm spreadsheet in Microsoft Excel format. It is generated into a new workbook.
  • . xlsx - Macros are not allowed to be stored

Supported content viewers

For a list of products that are supported for viewing this output type:
  1. Open the System Requirements.
  2. In the By type section, click Software.
  3. Scroll to the Content viewers section. Product names and versions that are supported for viewing PUB output are listed.

Template elements

Review the available template elements:
Table 1. Template elements available to use for the Microsoft Excel output format
Element Description Can contain other elements Can contain content values and expressions

Paragraph icon Paragraph

Use to group a section of elements. Adds a carriage return around its child elements in the output.

Yes

No

Container icon Container

Use to group a section of elements. Cannot be styled and does not affect the formatting of the output.

When used inside other elements, the child elements available to use within the container might be limited. For example:
  • Inside rows, containers can host cells only.
  • Inside lists, containers can host list-detail elements only.

Yes

No

Text icon Text

The content renders with the same, specified formatting.

No

Yes

Hyperlink icon Hyperlink

Creates a hyperlink in the output. The hyperlink can point to a location inside the document-style report or to an external location.

No

Yes

Image icon Image

Displays a .gif, .png, .jpg, emf, or wmf image in the output. The report designer can specify the image path in the template or the report generator can specify the path at run time.

No

Yes

Table icon Table

Creates a table in the output. A table can contain rows or container elements.

Yes

No

Row icon Row

Creates a row in the current table.

Yes

No

Cell icon Cell

Creates a cell in the current row of the current table.

Yes

No

Cell icon Cell

Creates a cell in the current row of the current table.

Yes

No

Document break Moves the next part of the spreadsheet to a new worksheet, with a name you specify on the tab. Yes No
Region Adds a static element to display the text from another element in the template, which is helpful for an element that you must update frequently. When you generate the output, that content of that element is used where the template has a region element. Yes No

List icon List

Creates a bulleted or numeric list in the output.

Yes

No

List item icon List Item

Creates a list item in the current list in the output.

Yes

No

Element properties

Review these notes to understand more about specifying the element properties in templates that are designed to generate Microsoft Excel documents.
Table 2. Cell properties
Cell properties Description
Border width You must specify a value for the border width to create a border in the output.
Cell alignment This property specifies the position of the text within the cell.
Cell width You can specify cell widths in pixels, points, or percents.
Table 3. Image properties
Image properties Description
Border width You must specify a value for the border width to create a border in the output.
Content Supported image formats:
  • Internet Explorer: .bmp, .emf, .gif, .jpg, .png, .svg (version 9 and later), .wmf
  • Firefox: .bmp, .gif, .jpg, .png, .svg
Table 4. Paragraph properties
Paragraph properties Description
Border width You must specify a value for the border width to create a border in the output.
Paragraph alignment Space the text across the page with a certain alignment.

Left, right, and center alignment, creates uneven paragraph edges, fitting as many words in a paragraph as possible. Justify creates even paragraph edges by inserting additional space between words on all lines except the last line. Distributed is similar to justify, except that space is also inserted between words in the last line of the paragraph.

Widow/orphan control N/A
Table 5. Row properties
Row properties Description
Row break across pages N/A
Table 6. Table properties
Table properties Description
Autofit to contents N/A
Border width You must specify a value for the border width to create a border in the output.
Cell spacing N/A
Fixed cell width in column N/A
Resize to fit contents N/A
Table 7. Table caption properties
Table caption properties Description
  N/A
Field code N/A
Table 8. Text properties
Text properties Description
Border width You must specify a value for the border width to create a border in the output.

Font properties for Text and Paragraph

Type Value Description
Font String, Cambria, Courier New, Georgia, Helvetica, Lucida, Tahoma, Times New Roman, Verdana Select one of the common fonts available in the dropdown menu or type the name of another font on your computer to use.
Size 1 to 1638 The point size of the text in the element. You can select a value from the dropdown menu or type a value between the supported sizes.
Example:
Font size example
Color 000000 to FFFFFF Default value: 000000

The hexadecimal color of the text in the element.

Example:
Font color example
Note: The value transparent is only supported for XSL-FO output.
Bold true, false Default value: false

true applies bold styling.

Example:
Bold example
Italic true, false Default value: false

true applies italic styling.

Example:
Italic example
Underline true, false, single, words, double, dotted, thick, dash, dash long, dot dash, dot dot dash, wavy, dotted heavy, dash heavy, dash long heavy, dot dash heavy, dot dot dash heavy, wavy heavy, wavy double Default value: false

true creates a horizontal line beneath the text.

Example:
Underline example
Strikethrough true, false, double Default value: false

true creates a horizontal line through the center of the text.

Example:
Strikethrough example
Hidden true, false Default value: false

true removes the text from the output.

Underline color 000000 to FFFFFF Default value: 000000

The hexadecimal color of the line underneath the text in the element.

Border properties for Text and Paragraph

Type Value Description
Border Color 000000 to FFFFFF The hexadecimal color of the border on the side of the text in the element. You can also set:
  • All Borders Color (Text, Paragraph, Table)
  • Top Border Color (Text)
  • Right Border Color (Text)
  • Left Border Color (Text)
  • Bottom Border Color (Text)
For Paragraph and Table, the border color is set to all child cells.
Border Style none, single, double, dotted, dashed The type of border used around the side of the element. You can also set:
  • All Borders Style (Text, Paragraph, Table)
  • Top Border Style (Text)
  • Right Border Style(Text)
  • Left Border Style (Text)
  • Bottom Border Style (Text)
For Paragraph and Table, the border style is set to all child cells.
Color 000000 to FFFFFF For Text, the text background color. For Paragraph, the paragraph background color. For Table, the table background color.

PUB styles versus external styles

Use external styles, which are defined in a style sheet, as much as possible. With this approach you can quickly change the appearance of the output document-style report and enforces a uniform look across the company.

Bookmarks

You can add hyperlinks to bookmarks in the Excel output.

Images in cells

Every image is given its own cell in the output spreadsheet; any text is in a separate cell. The cell expands to its limit (width and height) to match the actual image size. If the cell is merged, all the cells that are merged are resized to fit the image. If the image exceeds these dimensions, it extends beyond the cell, and you'll see a message in the console. You can add a hyperlink to an image in a spreadsheet by setting a URL. When a user clicks the image, the link opens in a browser. You can also set borders for an image.

Forcing a new sheet

PUB now supports multiple worksheets in Microsoft Excel workbooks. You can insert a new sheet by using the document break element. Everything after a document break is placed in the new worksheet. To specify the name of the new sheet, add it as a property of the document break. Make the name short enough that it also works as the tab name.