Expand description
Defines one ValueFormatXX per ValueType for textual formatting of those values.
use spreadsheet_ods::{ValueType};
use spreadsheet_ods::format::{FormatCalendarStyle, FormatNumberStyle, ValueFormatDateTime, ValueFormatNumber};
let mut v = ValueFormatDateTime::new_named("dt0");
v.part_day().long_style().build();
v.part_text(".").build();
v.part_month().long_style().build();
v.part_text(".").build();
v.part_year().long_style().build();
v.part_text(" ").build();
v.part_hours().long_style().build();
v.part_text(":").build();
v.part_minutes().long_style().build();
v.part_text(":").build();
v.part_seconds().long_style().build();
let mut v = ValueFormatNumber::new_named("n3");
v.part_number().decimal_places(3).build();Structs§
- Format
Part - One structural part of a value format.
- Part
AmPm Builder - Adds a format part to this format.
- Part
Boolean Builder - Adds a format part to this format.
- Part
Currency Symbol Builder - The number:currency-symbol element specifies whether a currency symbol is displayed in a currency style. The content of this element is the text that is displayed as the currency symbol. If the element is empty or contains white space characters only, the default currency symbol for the currency style or the language and country of the currency style is displayed.
- Part
DayBuilder - The number:day element specifies a day of a month in a date.
- Part
DayOf Week Builder - The number:day-of-week element specifies a day of a week in a date.
- Part
EraBuilder - The number:era element specifies an era in which a year is counted.
- Part
Fill Character Builder - Builder for FormatPart with type Number.
- Part
Fraction Builder - The number:fraction element specifies the display formatting properties for a number style that should be displayed as a fraction.
- Part
Hours Builder - The number:hours element specifies whether hours are displayed as part of a date or time.
- Part
Minutes Builder - The number:minutes element specifies whether minutes are displayed as part of a date or time. The number:minutes element is usable within the following elements:
- Part
Month Builder - Builder for FormatPart with type Month.
- Part
Number Builder - Builder for FormatPart with type Number.
- Part
Quarter Builder - The number:quarter element specifies a quarter of the year in a date.
- Part
Scientific Builder - Builder for FormatPart with type ScientificNumber.
- Part
Seconds Builder - The number:seconds element specifies whether seconds are displayed as part of a date or time.
- Part
Text Builder - Adds a format part to this format.
- Part
Text Content Builder - Adds a format part to this format.
- Part
Week OfYear Builder - The number:week-of-year element specifies a week of a year in a date.
- Part
Year Builder - The number:year element specifies a year in a date. The number:year element is usable within the following element:
- Value
Format Boolean - Formatting for Boolean.
- Value
Format Currency - Formatting for Boolean.
- Value
Format Date Time - Formatting for Boolean.
- Value
Format Number - Formatting for Boolean.
- Value
Format Percentage - Formatting for Boolean.
- Value
Format Ref - Reference
- Value
Format Text - Formatting for Boolean.
- Value
Format Time Duration - Formatting for Boolean.
- Value
Style Map - A style-map is one way for conditional formatting of value formats.
Enums§
- Format
Calendar Style - Calendar types.
- Format
Number Style - Flag for several PartTypes.
- Format
Part Type - Identifies the structural parts of a value format.
Traits§
- Value
Format Trait - Trait used by the builder types.
Functions§
- create_
boolean_ format - Creates a new number format.
- create_
currency_ prefix - Creates a new currency format.
- create_
currency_ suffix - Creates a new currency format.
- create_
date_ dmy_ format - Creates a new date format D.M.Y
- create_
date_ iso_ format - Creates a new date format YYYY-MM-DD
- create_
date_ mdy_ format - Creates a new date format M/D/Y
- create_
datetime_ format - Creates a datetime format Y-M-D H:M:S
- create_
loc_ boolean_ format - Creates a new number format.
- create_
loc_ currency_ prefix - Creates a new currency format.
- create_
loc_ currency_ suffix - Creates a new currency format.
- create_
loc_ date_ dmy_ format - Creates a new date format D.M.Y
- create_
loc_ date_ mdy_ format - Creates a new date format M/D/Y
- create_
loc_ datetime_ format - Creates a datetime format Y-M-D H:M:S
- create_
loc_ number_ format - Creates a new number format.
- create_
loc_ number_ format_ fixed - Creates a new number format with a fixed number of decimal places.
- create_
loc_ percentage_ format - Creates a new percentage format.
- create_
loc_ time_ format - Creates a new time-Duration format H:M:S
- create_
loc_ time_ interval_ format - Creates a new time-Duration format H:M:S
- create_
number_ format - Creates a new number format.
- create_
number_ format_ fixed - Creates a new number format with a fixed number of decimal places.
- create_
percentage_ format - Creates a new percentage format.
- create_
time_ interval_ format - Creates a new time-Duration format H:M:S
- create_
time_ of_ day_ format - Creates a new time format H:M:S