Microsoft Excel Feature Representation

Features read from an Excel spreadsheet consist of a series of attribute values. By default, there is no geometry produced but points can be created by identifying x, y, and (optionally) z coordinate types for particular columns.

The attribute names are as defined in the workspace. If attribute names are not defined, then default attribute names will be created which correspond to the column index. Features being returned may not respect their schema attribute types.

In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Type Attributes), this format also adds format-specific attributes (Format Attributes).

Attribute Name

Contents

xlsx_row_id

Row number within the file starting at 1.

Produced automatically on features from the Reader. Auto-exposed on the writer.

The xlsx_row_id is automatically set to this value on the writer when in Update or Delete mode, unless another attribute is explicitly chosen.

xlsx_row_formatting

List of name-value pairs, separated by semicolons.

xlsx_type

The type of geometric entity stored within the feature (Reader only). The valid values are:

  • XLSX_NONE – Features with no coordinates are tagged with this value when reading from Microsoft Excel.
  • XLSX_POINT – Features with valid x and y coordinates have a Point geometry added and are tagged with this value. There is no support for multi-points or point collections in XLSX. Points can also have a z-coordinate if one is specified in the schema. Note: Geometry will be created only on the reader, and only if both an x_coordinate and a y_coordinate attribute exists. Geometry on features entering the writer will be dropped.

Formula, Comment, Hyperlink, Formatting Column Attributes

Attribute names may also be added based on parameters set on the reader.

Attribute Name

Reader Parameter

Description

<attrName>.formula

Read Formulas (.formula)

If this parameter is selected, an attribute will be added to the workspace for columns that contain a formula. The reader reads formulas used to calculate the values of a cell and stores the formula in the attribute <attributeName>.formula.

<attrName>.comment

Read Comments (.comment)

If this parameter is selected, an attribute will be added to the workspace for all columns that contain a comment.

<attrName>.hyperlink

Read Hyperlinks (.hyperlink)

If this parameter is selected, an <attributeName>.hyperlink attribute will be added to the workspace for columns that contain a hyperlink.

<attrName>.formatting

Read Formatting (.formatting)

If this parameter is selected, an <attributeName>.formatting attribute will be added to the workspace for columns that contain formatting.

Raster Format Attributes

During read, these attributes may be set on features. When sending a raster feature to the writer, you can add the following attributes to modify the result.

Attribute Name

Reader/Writer

Description

xlsx_row_id

Both

Determines the row on which the top of the picture will be placed. The picture will align with the top of the row.

Only positive integer values are valid.

If not specified, this value will default to 1, which corresponds to row 1.

xlsx_col_id

Both

Determines the column on which the left of the picture will be placed. The picture will align on the left side of the column.

Only positive integer values or the Microsoft Excel Column letter designations (A,B,..,XFD) are valid.

If not specified, this value will default to 1, which corresponds to column A.

xlsx_raster_scale_factor

Writer only

Allows the raster to be scaled by a factor. This can be any positive numeric value greater than 0.0.

If not specified, the raster will be written out using the xlsx_raster_height and xlsx_raster_width.

If specified, xlsx_raster_height and xlsx_raster_width will be ignored.

For example, a scale factor of 2.0 will double the width and height of the raster. If the image is larger than the height or width of a cell, the image will cover multiple cells. The cell height will not change.

xlsx_raster_height

Both

Sets the raster height to the specified number of pixels. Only positive integer value greater than 0 are valid.

If xlsx_raster_scale_factor is specified, this value will be ignored. If this is used, you should also specify xlsx_raster_width.

If neither is specified, the raster will default to its actual size. If the image is larger than the height or width of a cell, the image will cover multiple cells. The cell height will not change.

xlsx_raster_width

Both

Sets the raster width to the specified number of pixels. Only positive integer value greater than 0 are valid.

If xlsx_raster_scale_factor is specified, this value will be ignored. If this is used, you should also specify xlsx_raster_height.

If neither is specified, the raster will default to its actual size. If the image is larger than the height or width of a cell, the image will cover multiple cells. The cell height will not change.

xlsx_raster_data

Both

If the feature does not have a raster geometry and this attribute is specified, its contents will be assumed to be an image’s binary data and will be written to the worksheet.

xlsx_raster_format

Reader only

When Read Embedded Images As is set to Attributes, the image’s format will be stored in this attribute.

This attribute is ignored by the writer.

xlsx_raster_location

Reader only

Excel allows images external to the workbook to be displayed.

These images are not directly read by the reader, and instead of xlsx_raster_data being set, this attribute will contain the file path to the raster.