Expand description
General utility functions used across the crate.
These functions are ported from Go lib.go and do not depend on the File
struct. File-specific helpers live in file.rs and excelize.rs.
Structs§
- Stack
- A simple stack abstraction.
Functions§
- bool_
ptr - Returns a reference-counted pointer-like
Boxcontainingtrueorfalse. - bstr_
marshal - Encodes characters as binary basic string escapes so that the value can be stored in an XML 1.0 document.
- bstr_
unmarshal - Parses the binary basic string, trimming escaped literals which are not
permitted in an XML 1.0 document. Escapes have the form
_xHHHH_. - cell_
name_ to_ coordinates - Converts an alphanumeric cell name to
[col, row]coordinates. - cell_
refs_ to_ coordinates - Converts two cell references to a coordinate tuple.
- column_
name_ to_ number - Converts an Excel column name to a 1-based column number.
- column_
number_ to_ name - Converts a 1-based column number to an Excel column name.
- coordinates_
to_ cell_ name - Converts
[col, row]coordinates to an alphanumeric cell name. - coordinates_
to_ range_ ref - Converts a coordinate tuple back to a range reference.
- count_
utf16_ string - Counts the number of UTF-16 code units in a string.
- flat_
sqref - Converts a reference sequence such as
"A1 A2:B3"to a map of column number to a sorted list of[col, row]coordinates. - float64_
ptr - Returns a
Somewrapper for af64value. - float_
to_ frac_ use_ continued_ fraction - Converts a floating-point decimal to a fraction using continued fractions and recurrence relations.
- float_
to_ fraction - Converts a floating-point number to a fraction string representation with the specified placeholder widths for numerator and denominator.
- in_
coordinates - Returns the index of
xin the coordinate lista, or-1if not found. - in_
float64_ slice - Returns the index of
xina, or-1if not found. - in_
str_ slice - Returns the index of
xina, or-1if not found. - int_ptr
- Returns a
Somewrapper for an integer value. - is_
numeric - Determines whether
sis a valid numeric expression and returns its precision and value. - join_
cell_ name - Joins column name and row number into a cell name.
- range_
ref_ to_ coordinates - Converts a range reference such as
"A1:B2"to[x1, y1, x2, y2]. - sort_
coordinates - Corrects a cell range so that the top-left and bottom-right corners are ordered correctly.
- split_
cell_ name - Splits a cell name into column name and row number.
- str_map
- Helper to build a
HashMap<String, String>from a static slice of pairs. - string_
ptr - Returns a
Somewrapper for a string value. - truncate_
utf16_ units - Truncates a string to a maximum number of UTF-16 code units.
- uint_
ptr - Returns a
Somewrapper for an unsigned 32-bit value.