files_format
Applies cell formatting to an A1 range in a Tabulya spreadsheet (bold/italic/underline/strikethrough, text & fill color, horizontal & vertical alignment, wrapping, font size, number format like currency/percent/accounting/text, thousands separators, date/time display format, and custom_format — an ECMA-376 number format code for anything the discrete tokens cannot express: section colors, conditions, fractions, padding, literals). Codes are stored in the invariant (English) notation, the same one files_text_formats returns. Pass clear:true to remove ALL formatting from the range. Requires edit permission; non-destructive (does not change values). Pass only the properties you want to change. Applied through the collaboration server. Signature: files_format(file_uuid, range, sheet?, clear?, bold?, italic?, underline?, strikethrough?, text_color?, fill_color?, align?, vertical_align?, wrap?, number_format?, decimals?, currency_symbol?, negative?, numeric_commas?, custom_format?, date_time?, font_size?).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_uuid": "<file_uuid>",
"range": "<range>"
},
"name": "files_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| wrap | No | ||
| align | No | Horizontal alignment. | |
| clear | No | Remove ALL formatting from the range (other properties are ignored when true). | |
| range | Yes | A1 range to format, e.g. 'A1:C10', 'B:B' (whole column). | |
| sheet | No | Sheet name (defaults to the first sheet). | |
| italic | No | ||
| decimals | No | Number of decimal places. | |
| negative | No | Negative-value style for number_format='number' and 'currency': minus (default), minus_red (red), red (no sign, red), parentheses, parentheses_red. | |
| date_time | No | Date/time display format string (strftime-style, e.g. '%Y-%m-%d' or '%-m/%-d/%Y %-I:%M %p'). | |
| file_uuid | Yes | ||
| font_size | No | Font size in points. | |
| underline | No | ||
| fill_color | No | Background hex color. | |
| text_color | No | Hex color, e.g. '#1F77B4'. | |
| custom_format | No | Excel (ECMA-376) number format code, e.g. '#,##0.00;[Red](#,##0.00)', '0.00%', '# ??/??', '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)'. Use it for anything the discrete number_format tokens cannot express: section colors, conditions, fractions, fill/pad characters, literal text. Overrides number_format and date_time. Separators are rendered in the Russian locale (space for thousands, comma for decimals) like the rest of the grid. | |
| number_format | No | Number display format. 'text' keeps input as raw text (no number/date inference); 'accounting' is currency with negatives in parentheses and zero as a dash. | |
| strikethrough | No | ||
| numeric_commas | No | Show thousands separators (e.g. 1,234,567). | |
| vertical_align | No | Vertical alignment. | |
| currency_symbol | No | Currency symbol when number_format='currency' or 'accounting' (default '$'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| file_uuid | Yes | ||
| sequence_number | Yes |