The Model Gateway matrix format allows you to import and export Excel sheets which have a matrix like layout (similar to Excel pivot tables).

The matrix formatting is implemented on top of the normal table import/export:

- for import the matrix is first converted to a table before being imported
- for export the Model Gateway exports a table, and then the table is converted to a matrix which is written to Excel

### Configuring the matrix format in the Rule Model

To use the matrix format the *Sheet* format attribute must be set to matrix.

In order to facilitate your life you can use the *WorkBook* 'Init Matrix Sheet' script (available in *WorkBook* context menu) to create an already configured *Sheet* with the three base *Columns* of a standard matrix rule sheet.

A simple matrix rule sheet contains the following *Columns* (note that the name of the *Columns* is important as it allows the Model Gateway to identify their role):

- Row: data which his placed in the vertical headers of the matrix
- Column: data which his placed in the horizontal headers of the matrix
- Content: data which is placed in the matrix cells, note that this
*Column*is optional, if it is not present the Model Gateway will place a marker in the cells which correspond to a table entry.

It is possible to include several layers or Rules and Columns.

The attached picture is an example:

You could add Row2, Row3,... if you wish