module XlsxParser::Styles

Overview

Module XlsxParser::Styles contains a map of non-custom numFmtId to casting format.

The Format of a cell tells the converter which type should be used when parsing the cell value.

Defined in:

xlsx-parser/styles.cr
xlsx-parser/styles/converter.cr
xlsx-parser/styles/parser.cr

Constant Summary

NumFmtMap = {0 => Format::General, 1 => Format::Integer, 2 => Format::Float, 3 => Format::Integer, 4 => Format::Float, 5 => Format::Unsupported, 6 => Format::Unsupported, 7 => Format::Unsupported, 8 => Format::Unsupported, 9 => Format::Percentage, 10 => Format::Percentage, 11 => Format::Scientific, 12 => Format::Unsupported, 13 => Format::Unsupported, 14 => Format::Date, 15 => Format::Date, 16 => Format::Date, 17 => Format::Date, 18 => Format::Time, 19 => Format::Time, 20 => Format::Time, 21 => Format::Time, 22 => Format::DateTime, 27 => Format::Date, 28 => Format::Date, 29 => Format::Date, 30 => Format::Date, 31 => Format::Date, 32 => Format::Time, 33 => Format::Time, 34 => Format::Time, 35 => Format::Time, 36 => Format::Date, 37 => Format::Unsupported, 38 => Format::Unsupported, 39 => Format::Unsupported, 40 => Format::Unsupported, 41 => Format::Unsupported, 42 => Format::Unsupported, 43 => Format::Unsupported, 44 => Format::Unsupported, 45 => Format::Time, 46 => Format::Time, 47 => Format::Time, 48 => Format::Scientific, 49 => Format::Unsupported, 50 => Format::Date, 51 => Format::Date, 52 => Format::Date, 53 => Format::Date, 54 => Format::Date, 55 => Format::Time, 56 => Format::Time, 57 => Format::Date, 58 => Format::Date}

Built-in number formats, see ECMA-376 Part 1, 18.8.30 numFmt. Ids 27-36 and 50-58 are locale dependent (CJK dates and times).