Module format

Module format 

Source
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§

FormatPart
One structural part of a value format.
PartAmPmBuilder
Adds a format part to this format.
PartBooleanBuilder
Adds a format part to this format.
PartCurrencySymbolBuilder
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.
PartDayBuilder
The number:day element specifies a day of a month in a date.
PartDayOfWeekBuilder
The number:day-of-week element specifies a day of a week in a date.
PartEraBuilder
The number:era element specifies an era in which a year is counted.
PartFillCharacterBuilder
Builder for FormatPart with type Number.
PartFractionBuilder
The number:fraction element specifies the display formatting properties for a number style that should be displayed as a fraction.
PartHoursBuilder
The number:hours element specifies whether hours are displayed as part of a date or time.
PartMinutesBuilder
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:
PartMonthBuilder
Builder for FormatPart with type Month.
PartNumberBuilder
Builder for FormatPart with type Number.
PartQuarterBuilder
The number:quarter element specifies a quarter of the year in a date.
PartScientificBuilder
Builder for FormatPart with type ScientificNumber.
PartSecondsBuilder
The number:seconds element specifies whether seconds are displayed as part of a date or time.
PartTextBuilder
Adds a format part to this format.
PartTextContentBuilder
Adds a format part to this format.
PartWeekOfYearBuilder
The number:week-of-year element specifies a week of a year in a date.
PartYearBuilder
The number:year element specifies a year in a date. The number:year element is usable within the following element:
ValueFormatBoolean
Formatting for Boolean.
ValueFormatCurrency
Formatting for Boolean.
ValueFormatDateTime
Formatting for Boolean.
ValueFormatNumber
Formatting for Boolean.
ValueFormatPercentage
Formatting for Boolean.
ValueFormatRef
Reference
ValueFormatText
Formatting for Boolean.
ValueFormatTimeDuration
Formatting for Boolean.
ValueStyleMap
A style-map is one way for conditional formatting of value formats.

Enums§

FormatCalendarStyle
Calendar types.
FormatNumberStyle
Flag for several PartTypes.
FormatPartType
Identifies the structural parts of a value format.

Traits§

ValueFormatTrait
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