Currency & unit conversionsReference
Currency & unit conversions. A calc rule converts an amount into another currency, or a quantity into another unit, and stores the result. Put the conversion in the Value column — the target field becomes read-only and recalculates whenever the record is saved (and updates live as you type). Four functions are available — two that read conversion tables in your own workbook, and two that need no tables at all:
| Function | What it does |
|---|---|
currency_conversion(amount, from, to) | Converts the amount using your workbook's own Exchange Rates table. |
unit_conversion(quantity, from, to) | Converts the quantity using your workbook's own Unit Conversions table. |
currency_conversion_api(amount, from, to, date) | Converts using live exchange rates — no table needed. The date is optional (see below). |
unit_conversion_api(quantity, from, to) | Converts using SheetApps' built-in unit table — no table needed. |
What the arguments are. Each function takes the value to convert first — the money or quantity field — then the from and to codes; currency_conversion_api takes an optional fourth argument, the date. A blank value stays blank (never 0), and the result always carries the target code — a literal "EUR" fixes the field to euros, on screen and in exports.
The codes can be fixed or per-record. Write from and to as a fixed code in quotes ("EUR"), or as a field name (currency) so each record converts from its own currency or unit — e.g. currency_conversion(total_amount, currency, "EUR") turns each order's total into euros. You can do arithmetic around a conversion too (… * 1.02).
Table conversions read two reserved lookup sheets: Exchange Rates with columns From · To · Rate, and Unit Conversions with From · To · Factor. SheetApps uses the exact pair, its reverse, or ×1 for the same code; if the pair is missing it blocks the save and tells you which pair to add. Edit these tables any time in Master Data — no re-upload needed.
API conversions need no tables. currency_conversion_api pulls live European Central Bank reference rates from the free, keyless Frankfurter service (frankfurter.dev): pass a date (a date field, or an ISO date like "2026-07-01") to convert at that day's published rate, or leave it off for today's. unit_conversion_api uses a built-in table covering common units of mass, length, area, volume, temperature and time (UNECE codes and everyday names like kg, lb, ft, °C). Both work in published bundles whenever the computer running them has internet.
currency_conversion_api can't convert a pair it doesn't list, and blocks the save with a message naming the pair. For any currency it doesn't cover, use the table-based currency_conversion and supply the rate yourself: add the From · To · Rate row to your Exchange Rates sheet, or maintain it in the app's Master Data.Total EUR is always €, whatever currency the order was entered in. If a live rate can't be fetched and none is cached, the save is blocked until the rate service is reachable; a missing table pair blocks the save the same way.