Formatting and number formats
Updated 2026-11-13
What the formatting toolbar of the editor does, how to set a number format, and why the number format of a cell matters for the inputs and outputs of your service.
The formatting toolbar
The toolbar sits above the sheet on the Configuration (Konfiguration) tab. Select one or more cells, then click a button. From left to right:
| Button | What it does |
|---|---|
| Bold (Fett), Italic (Kursiv), Underline (Unterstrichen), Strikethrough (Durchgestrichen) | Text style. A second click switches it off. |
| Font size (Schriftgröße) | Sizes from 8 to 72. |
| Text color (Textfarbe), Background color (Hintergrundfarbe) | A palette plus a custom colour. No color (Keine Farbe) removes the background. |
| Alignment (Ausrichtung) | Align left, Align center, Align right. |
| Number format (Zahlenformat) | How a number, date or text is shown; see below. |
| Merge cells (Zellen verbinden) | Merges the selected cells into one, or splits a merged cell again. |
| Wrap text (Zeilenumbruch) | Shows long text on several lines inside the cell. |
| Borders (Rahmen) | Lines around and between the selected cells. |
| Clear formatting (Formatierung löschen) | Removes all formatting of the selected cells, including the number format. |
The remaining buttons (Insert function, Find & replace, Name manager, Data validation, Undo) are tools for building a model; see Build a workbook in the editor.
Formatting changes count as changes to the workbook. Click Save (Speichern) to keep them.
Set a number format
- Select the cells.
- Click Number format in the toolbar. The button shows the format of the active cell.
- Choose an entry.
| Entry | Example | Format code |
|---|---|---|
| General (Standard) | as typed | General |
| Number (Zahl) | 1,234.56 | #,##0.00 |
| Integer (Ganzzahl) | 1,234 | #,##0 |
| Currency (Währung) | 1,234.56 € | #,##0.00 "€" |
| Currency | €1,234.56 | €#,##0.00 |
| Currency | $1,234.56 | $#,##0.00 |
| Currency | £1,234.56 | £#,##0.00 |
| Currency | CHF 1,234.56 | "CHF" #,##0.00 |
| Percentage (Prozent) | 12.34% | 0.00% |
| Percentage | 12% | 0% |
| Date (Datum) | 2024-01-15 | yyyy-mm-dd |
| Date | 15.01.2024 | dd.mm.yyyy |
| Date | 01/15/2024 | mm/dd/yyyy |
| Text | as typed | @ |
| Custom format… (Eigenes Format…) | opens a dialog | your own code |
Custom formats
Custom format… opens a dialog with the categories General, Number, Currency, Accounting (Buchhaltung), Percentage, Date, Text and Custom (Benutzerdefiniert). Depending on the category you set Decimals, Use thousands separator, a currency Symbol and Show negative numbers in red. Under Custom you type an Excel format code yourself, for example #,##0.0 "kg". Click Apply (Übernehmen).
A format changes how a value is shown, never the value itself. A cell that shows 19% holds the number 0.19.
Why formats matter for your service
When you add a cell as an input or output, SpreadAPI reads the cell's number format and sets the parameter up from it:
| Cell format | Effect on an input | Effect on an output |
|---|---|---|
| Percentage | The input is marked as a percentage. Callers send a decimal, 0.05 for 5%. Minimum 0 and maximum 1 are suggested. | The output gets a format such as 0.00%. |
| Currency | The input gets a display format such as €#,##0.00. | The output gets the same kind of format. |
| Date | No special handling of the value. | The output gets the format marker date. |
| Other number formats | The input gets a simplified display format, for example #,##0.00. | The output gets the same. |
| General or Text | No format. | No format. |
So format the cells before you add them as parameters. Details and examples are in Percentages and formats.
Formats and parameters stay in step
If you change the number format of a cell that already is an input or output, using the toolbar, the parameter is updated to match. You see the notice Parameter format updated to match the cell: … with the names of the changed parameters. An input whose cell becomes a percentage is marked as a percentage; one whose cell is no longer a percentage loses the mark. Clear formatting counts as a format change too.
The parameter change is part of the draft. Click Save and publish again to make it live.
What callers receive
The API returns the calculated value as it is stored, not the formatted text: 0.0725, not "7.25%". When an output has a format, the answer carries it next to the value as formatString, so the caller can display the number the way the workbook does. Web apps and AI assistants use this format when they show results. See The API response.
For developers and agents
- Number formats use Excel format codes. A bare
%in the code marks a percentage; a%inside quotes, as in0" %", is only a displayed character and does not mark one. - Currency is recognised by
€,$,£,¥,₹orCHFin the format code. - Complex Excel formats are reduced to their positive section for the parameter:
€#,##0.00;[Red]-€#,##0.00becomes€#,##0.00. - A parameter's format can also be edited by hand in the parameter dialog: Display Format (Optional) for a number input, Format String (Optional) for an output.
FAQ
How do I format a cell as a percentage?
Select the cell, click Number format in the toolbar and choose Percentage (12.34%) or Percentage (12%). The cell keeps its value, for example 0.19, and shows it as 19%.
How do I show a number as currency?
Select the cell, click Number format and choose one of the Currency entries for €, $, £ or CHF. For another symbol or layout, choose Custom format….
Does formatting change the result of my API?
No. The API returns the stored value, for example 0.0725. The format travels with an output as formatString so that a caller can display the value the same way.
Why does the format of a cell matter when I add it as an input?
SpreadAPI sets the parameter up from the cell's format. A cell formatted as a percentage becomes a percentage input, for which callers send decimals such as 0.05 for 5%.
I changed a cell's format and got "Parameter format updated to match the cell". What does it mean?
The cell belongs to an input or output, and its parameter was updated to the new format. Click Save and publish again so callers get the change.
How do I remove all formatting from a cell?
Select the cell and click Clear formatting in the toolbar. This also resets the number format, and a parameter on that cell loses its format.
Can I use my own number format, like kilograms?
Yes. Choose Custom format… in the Number format menu, open Custom and type a format code such as #,##0.0 "kg". Click Apply.
Why does my date show as a number?
The cell has the format General, which shows a date as Excel's serial number. Select the cell and choose a Date entry in Number format.
How does an AI agent see the format of an output?
Each output in the answer carries formatString when the output has a format, for example "€#,##0.00" or "0.00%". The agent applies it to value when presenting the result.