> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Format to XLSX

> Converts a data object or array into a binary XLSX file.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Turns a list of rows into a binary XLSX spreadsheet, the file format used by Microsoft Excel and similar tools. Use this when you need to produce a real spreadsheet file to attach to an email or upload to another system. Give it a list where each item is one row, and each row is itself a list of cell values; those values are written into the first worksheet, left to right, top to bottom. Because the result is a binary file rather than text, you usually pass it straight on to be written to disk or sent as an attachment.

This documentation describes: [Schema](/schemas/mapper/serialize-xlsx)

## Sample data

The result of this mapper is a binary spreadsheet file, not readable text, so there is no text output to show. The input is a list of rows: the first row below holds the column headers, and each following row is one line of data. That data would be written into the cells of the first worksheet.

This is a complete example configuration. There are no settings to fill in.

```json Configuration theme={null}
{
  "prototype": "serialize-xlsx",
  "parameters": {}
}
```

Example input (a list of rows):

```json theme={null}
[
    ["SKU", "Name", "Price"],
    ["SCARF-01", "Wool scarf", 24.95],
    ["BELT-02", "Leather belt", 39.50]
]
```

The mapper turns this into a binary `.xlsx` file whose first worksheet contains the three rows above, with `SKU`, `Name`, and `Price` as the header row.
