Microsoft Excel: Writer Feature Type Parameters

To access feature type parameters, click the gear icon on a feature type in the workspace. This opens the Feature Type Parameter Editor.

Tip  To always display the editor in FME Workbench, you can select View > Windows > Parameter Editor.

General

All feature types share similar General parameters, which may include Feature Type Name, Reader or Writer information, and Geometry.

In most Writer Feature Type parameter dialogs, you can also control Dynamic Schema Definitions. Some database formats accept Table or Index Qualifier prefixes on the output table feature type.

Features written to the database have the destination table as their feature type, and attributes as defined on the feature type.

Important  These parameters apply only to a selected feature type, not to the entire writer. If a feature type parameter listed here conflicts with a writer-level parameter, then the writer parameter will be ignored and this feature type parameter will be used.

Sheet Settings

Writer Mode

The writer mode can be specified on the feature type or on individual features.

At the feature type level, the writer mode is specified by this parameter. It may be superseded on individual features by the fme_db_operation format attribute when the Writer Mode is not Insert.

Valid feature type writer modes are listed below:

Mode Description
Insert

Appends features to the end of the sheet, or writes them to an exact row and/or column.

Any data that already exists in that location will be overwritten. If there is a row value specified for the Row Number Attribute, that row will be used instead.

Note  The Insert feature type writer mode will ignore any feature-level writer modes using fme_db_operation. If per-feature writer modes are desired, consider using Update at the feature type level (described below).
Update

Causes the row corresponding to the feature’s value specified in the Row Number Attribute to have its data changed to the values on the incoming feature.

If an attribute is missing on the incoming feature, the existing cell value will not be overwritten.

Note  In FME versions before 2021.1, the Use Attribute Names as Column Positions option must be enabled for this to behave as expected.
Delete

Deletes the values in the row corresponding to the feature’s value specified in the Row Number Attribute.

Only a number of columns equal to the amount of columns on the incoming feature will have their data and formatting removed.

Format Field Names Row

  • Yes – Any column formatting will be applied to the Field header.

  • No – The column Header will be unformatted (black).

In the example below, the Power column contains a custom format string: [Green][<-50];[Yellow][>=-50]

Example showing custom format string field

If

and

Then

Format Field Name Row = Yes

 

Value is less than 50

Power column number format is Green

Value is greater than or equal to 50

Power column number format is Yellow

Use Attribute Names as Column Positions

  • No (default) – The columns will be written in the order on the schema.
  • Yes – Treat attribute names, such as A, B, or C as the column name in which to write the data.

Row Number Attribute

The writer allows you to specify an input attribute to contain the value of the row number identifier to be used for per-feature Update and Delete operations.

The default row number attribute is the xlsx_row_id attribute produced by the Excel reader to hold the row number, but it can be changed to any attribute.

Note  Unlike databases, where row IDs may not be ordered, the row number identifier corresponds to the number of rows from the top of the sheet (similar to the row number in a CSV file).

Freeze First Row(s)

This parameter allows the users to freeze the first n rows, where n is the last row to be frozen. For example,

  • 1 – the first row is frozen
  • 2 – the first two rows are frozen
  • 5 – the first five rows are frozen

In Excel this feature is called Freeze Panes, and it allows you to freeze a portion of the sheet so that certain rows like column headers remain visible while scrolling.

This option has no effect on named ranges.

Output Field Names

This parameter specifies whether or not to write the attribute names when inserting data.

If no template file is used, this parameter has an effect only if the sheet or named range is being created or has been dropped or truncated prior to insertion. Otherwise, attribute names will not be added to existing worksheets or named ranges.

Field Names Row Formatting

This parameter sets the format for the entire field names row.

Enabling this option allows you to set the row height, font style, background color and pattern, cell borders, and text alignment. See Formatting in the User Attributes topic for a detailed description of each option.

Note  This style will not be applied when adding to existing worksheets or named ranges.