Field escaping. No field in a PSOSF worksheet or test file may begin with a character a spreadsheet application would evaluate (a trigger character), so any valid file is safe to open directly.
Content is one of: {:kind :formula :text "=A1+3"} written psosf:=A1+3 {:kind :text :text "..."} a value, header, annotation or style
Writing: text beginning with a trigger character, an apostrophe or psosf: gets a leading apostrophe; a formula gets the psosf: prefix. A plain number such as -400 is written as is.
Every field is also checked for characters and length:
Field escaping. No field in a PSOSF worksheet or test file may begin with a
character a spreadsheet application would evaluate (a trigger character),
so any valid file is safe to open directly.
Content is one of:
{:kind :formula :text "=A1+3"} written psosf:=A1+3
{:kind :text :text "..."} a value, header, annotation or style
Writing: text beginning with a trigger character, an apostrophe or psosf:
gets a leading apostrophe; a formula gets the psosf: prefix. A plain number
such as -400 is written as is.
Every field is also checked for characters and length:
- no control characters other than tab, line feed and carriage return,
so raw binary cannot sit in a field;
- no more than 32,767 characters, Excel's limit for a cell;
- no Unicode direction controls, which can make text display differently
from what it is, except in data values, where right-to-left text
legitimately uses them.(character-error field data?)An error for a field's characters or length, or nil. data? true for a data value (not a formula), where direction controls are allowed.
An error for a field's characters or length, or nil. data? true for a data value (not a formula), where direction controls are allowed.
Excel's limit on the characters in a cell, counted as UTF-16 code units.
Excel's limit on the characters in a cell, counted as UTF-16 code units.
(mixed-scripts s)The scripts a name mixes from Latin, Cyrillic and Greek, when it mixes two or more: such a name can impersonate another (a Cyrillic а in place of a Latin a). nil otherwise.
The scripts a name mixes from Latin, Cyrillic and Greek, when it mixes two or more: such a name can impersonate another (a Cyrillic а in place of a Latin a). nil otherwise.
(read-field field {:keys [cell? legacy? data?]})Reads one field. Options: :cell? true when the field is a cell (line 5 onward), the only place a formula may appear; :legacy? true for a version 1.0 archive; :data? true for a data value (a cell, or a test file's value), where direction controls are allowed. Returns content, or {:error code :message ... :fix ...}.
Reads one field. Options: :cell? true when the field is a cell (line 5
onward), the only place a formula may appear; :legacy? true for a
version 1.0 archive; :data? true for a data value (a cell, or a test
file's value), where direction controls are allowed. Returns content, or
{:error code :message ... :fix ...}.(write-content {:keys [kind text]})Escapes cell content: a formula or text.
Escapes cell content: a formula or text.
(write-text s)Escapes text for any field.
Escapes text for any field.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |