Expand description
SheetKit: High-level API for reading and writing Excel (.xlsx) files.
§Quick Start
use sheetkit::Workbook;
let wb = Workbook::new();
wb.save("output.xlsx").unwrap();Modules§
- utils
- Utility functions for cell reference conversion.
Structs§
- Alignment
Style - Alignment style definition.
- AppProperties
- User-facing application properties.
- Border
Side Style - Border side style definition.
- Border
Style - Border style definition.
- Chart
Config - Configuration for a chart.
- Chart
Series - A single data series within a chart.
- Comment
Config - Configuration for a cell comment.
- Conditional
Format Rule - A single conditional formatting rule with its style.
- Conditional
Style - Style applied by a conditional formatting rule.
- Data
Validation Config - Configuration for a data validation rule.
- Defined
Name Info - Information about a defined name.
- DocProperties
- User-facing document core properties.
- Fill
Style - Fill style definition.
- Font
Style - Font style definition.
- Form
Control Config - Configuration for adding a form control to a worksheet.
- Form
Control Info - Information about an existing form control, returned when querying.
- Gradient
Fill Style - Gradient fill style definition.
- Gradient
Stop - A single stop in a gradient fill.
- Hyperlink
Info - Hyperlink information returned by get operations.
- Image
Config - Configuration for inserting an image into a worksheet.
- Open
Options - Options for controlling how a workbook is opened and parsed.
- Page
Margins Config - Page margin configuration in inches.
- Person
Data - Output data for a person.
- Person
Input - Input configuration for adding a person.
- Picture
Info - Information about a picture retrieved from a worksheet.
- Pivot
Data Field - A data/value field in the pivot table.
- Pivot
Field - A field used as row or column in the pivot table.
- Pivot
Table Config - Configuration for adding a pivot table.
- Pivot
Table Info - Information about an existing pivot table.
- Protection
Style - Protection style definition.
- Render
Options - Options for rendering a worksheet to SVG.
- Rich
Text Run - A single formatted text segment within a rich text cell.
- Shape
Config - Configuration for inserting a shape into a worksheet.
- Sheet
Protection Config - Configuration for sheet protection.
- Slicer
Config - Configuration for adding a slicer to a table.
- Slicer
Info - Information about an existing slicer, returned by
get_slicers. - Sparkline
Config - Configuration for creating a sparkline group.
- Stream
Writer - A streaming worksheet writer that writes rows directly to a temp file.
- Style
- User-facing style definition.
- Threaded
Comment Data - Output data for a threaded comment.
- Threaded
Comment Input - Input configuration for adding a threaded comment.
- VbaModule
- A single VBA module with its name, source code, and type.
- VbaProject
- Result of extracting a VBA project from a
.xlsmfile. - View3D
Config - 3D view configuration for charts.
- Workbook
- In-memory representation of an
.xlsxworkbook. - Workbook
Protection Config - Configuration for workbook protection.
Enums§
- Aggregate
Function - Aggregate function for pivot table data fields.
- AuxParts
- Controls when auxiliary parts (comments, charts, images, etc.) are parsed.
- Border
Line Style - Border line style.
- Cell
Value - Represents the value of a cell.
- CfOperator
- Comparison operator for CellIs conditional formatting rules.
- CfValue
Type - Value type for color scale and data bar thresholds.
- Chart
Type - The chart type to render.
- Conditional
Format Type - The type of conditional formatting rule.
- Custom
Property Value - Value type for custom properties.
- Defined
Name Scope - Scope of a defined name.
- Error
- The top-level error type for SheetKit.
- Error
Style - The error display style for validation failures.
- Form
Control Type - Form control types.
- Gradient
Type - Gradient type.
- Horizontal
Align - Horizontal alignment.
- Hyperlink
Type - Type of hyperlink target.
- Image
Format - Supported image formats.
- NumFmt
Style - Number format style.
- Orientation
- Page orientation.
- Paper
Size - Standard paper sizes. The numeric values follow the OOXML specification.
- Pattern
Type - Pattern fill type.
- Read
Mode - Controls how worksheets and auxiliary parts are parsed during open.
- Shape
Type - Preset geometry shape types supported by OOXML.
- Sparkline
Type - Sparkline type.
- Style
Color - Color specification.
- Validation
Operator - The comparison operator for data validation.
- Validation
Type - The type of data validation to apply.
- VbaModule
Type - Classification of a VBA module.
- Vertical
Align - Vertical alignment.
- Workbook
Format - The OOXML package format, determined by the workbook content type in
[Content_Types].xml. Controls which content type string is emitted forxl/workbook.xmlon save.
Functions§
- builtin_
format_ code - Map a built-in number format ID (0-49) to its format code string.
- date_
to_ serial - Convert a
NaiveDateto an Excel serial number. - datetime_
to_ serial - Convert a
NaiveDateTimeto an Excel serial number with fractional time. - format_
number - Format a numeric value using the given format code string.
- format_
with_ builtin - Format a numeric value using a built-in format ID.
Returns
Noneif the ID is not a recognized built-in format. - is_
date_ format_ code - Returns
trueif a custom number format string looks like a date/time format. - is_
date_ num_ fmt - Returns
trueif the given number format ID is a built-in date or time format. - rich_
text_ to_ plain - Extract plain text from a slice of rich text runs.
- serial_
to_ date - Convert an Excel serial number to a
NaiveDate. - serial_
to_ datetime - Convert an Excel serial number to a
NaiveDateTime.
Type Aliases§
- Result
- A convenience alias used throughout the crate.