You are here: FME Readers and Writers > Microsoft Excel Reader (XLSXR)/Writer (XLSXW2)

Microsoft Excel Reader (XLSXR)/Writer (XLSXW2)

Licensing options for this format begin with FME Professional Edition.

The Microsoft Excel reader and writer modules provide FME with access to attribute data held in Microsoft Excel spreadsheets, also known as workbooks.

This format uses two abbreviations, or shortnames:

Versions

This format supports:

The newer .xlsx version is an XML based spreadsheet and is defined in the Office Open XML (OOXML) specification. The Excel reader/writer does not support Binary Workbooks (.xlsb), Macro-enabled Template (.xltm), or Excel Add-in (.xlam).

This reader/writer can only process a single file type at a time.

Overview

FME provides read and write access to Microsoft Excel spreadsheets. Excel spreadsheets may contain multiple worksheets and each worksheet may optionally contain specifically named cell ranges called Named Ranges.

FME treats worksheets and named ranges as feature types and can read cell data as well as write cell data and formatting information to them. FME treats each column in a worksheet or named range as an attribute and each row as a feature.

Usage Notes

Formulas

This format supports formulas.

x, y, z coordinates

This data may not necessarily have a spatial component to it but columns can be identified as x, y, or z coordinates to create point geometries.

Attribute Names and Column Values

The reader will match attribute names to column values on the header row, to allow for reordering of the schema in FME or reordering of the columns in the source files. However, renaming a column in the file (but not changing the workspace attributes) will cause that column to be ignored.

Pivot Tables, Charts, Graphs

FME currently does not support creating new Pivot tables, charts, or graphs, but can add data to them if they exist in template files or sheets.

Template File

The Microsoft Excel writer allows the specification of a template file to use as a starting point for creating a new dataset. If a template file name is specified, the writer will make a copy of the template file in the location specified in the Dataset parameter. All write operations will be performed on the copy. The template file specified remains unchanged.

This is particularly useful when populating an area of the template with data such as an existing chart, graph, or pivot table or when creating many spreadsheets from a single template. If the destination dataset already exists, and a template file is specified, the destination dataset will always be overwritten, regardless of the specified choice in the Overwrite File: option. Likewise, the writer feature type option to Drop Existing Sheet/Named Range is irrelevant if a template file or template sheet is specified, as the existing sheet will always be replaced by the template sheet. However, the writer feature type option to Truncate Existing Sheet/Named Range is applied to template sheets after being copied to the destination file.

Formatting

Formatting (font, background colors, etc.) are supported on the writer only, and so will not be preserved from the reader to the writer. Formatting in a template file will be preserved but will not be used in modifications to it.

Terminology in this Chapter