Crate sheetkit

Crate sheetkit 

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

AlignmentStyle
Alignment style definition.
AppProperties
User-facing application properties.
BorderSideStyle
Border side style definition.
BorderStyle
Border style definition.
ChartConfig
Configuration for a chart.
ChartSeries
A single data series within a chart.
CommentConfig
Configuration for a cell comment.
ConditionalFormatRule
A single conditional formatting rule with its style.
ConditionalStyle
Style applied by a conditional formatting rule.
DataValidationConfig
Configuration for a data validation rule.
DefinedNameInfo
Information about a defined name.
DocProperties
User-facing document core properties.
FillStyle
Fill style definition.
FontStyle
Font style definition.
FormControlConfig
Configuration for adding a form control to a worksheet.
FormControlInfo
Information about an existing form control, returned when querying.
GradientFillStyle
Gradient fill style definition.
GradientStop
A single stop in a gradient fill.
HyperlinkInfo
Hyperlink information returned by get operations.
ImageConfig
Configuration for inserting an image into a worksheet.
OpenOptions
Options for controlling how a workbook is opened and parsed.
PageMarginsConfig
Page margin configuration in inches.
PersonData
Output data for a person.
PersonInput
Input configuration for adding a person.
PictureInfo
Information about a picture retrieved from a worksheet.
PivotDataField
A data/value field in the pivot table.
PivotField
A field used as row or column in the pivot table.
PivotTableConfig
Configuration for adding a pivot table.
PivotTableInfo
Information about an existing pivot table.
ProtectionStyle
Protection style definition.
RenderOptions
Options for rendering a worksheet to SVG.
RichTextRun
A single formatted text segment within a rich text cell.
ShapeConfig
Configuration for inserting a shape into a worksheet.
SheetProtectionConfig
Configuration for sheet protection.
SlicerConfig
Configuration for adding a slicer to a table.
SlicerInfo
Information about an existing slicer, returned by get_slicers.
SparklineConfig
Configuration for creating a sparkline group.
StreamWriter
A streaming worksheet writer that writes rows directly to a temp file.
Style
User-facing style definition.
ThreadedCommentData
Output data for a threaded comment.
ThreadedCommentInput
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 .xlsm file.
View3DConfig
3D view configuration for charts.
Workbook
In-memory representation of an .xlsx workbook.
WorkbookProtectionConfig
Configuration for workbook protection.

Enums§

AggregateFunction
Aggregate function for pivot table data fields.
AuxParts
Controls when auxiliary parts (comments, charts, images, etc.) are parsed.
BorderLineStyle
Border line style.
CellValue
Represents the value of a cell.
CfOperator
Comparison operator for CellIs conditional formatting rules.
CfValueType
Value type for color scale and data bar thresholds.
ChartType
The chart type to render.
ConditionalFormatType
The type of conditional formatting rule.
CustomPropertyValue
Value type for custom properties.
DefinedNameScope
Scope of a defined name.
Error
The top-level error type for SheetKit.
ErrorStyle
The error display style for validation failures.
FormControlType
Form control types.
GradientType
Gradient type.
HorizontalAlign
Horizontal alignment.
HyperlinkType
Type of hyperlink target.
ImageFormat
Supported image formats.
NumFmtStyle
Number format style.
Orientation
Page orientation.
PaperSize
Standard paper sizes. The numeric values follow the OOXML specification.
PatternType
Pattern fill type.
ReadMode
Controls how worksheets and auxiliary parts are parsed during open.
ShapeType
Preset geometry shape types supported by OOXML.
SparklineType
Sparkline type.
StyleColor
Color specification.
ValidationOperator
The comparison operator for data validation.
ValidationType
The type of data validation to apply.
VbaModuleType
Classification of a VBA module.
VerticalAlign
Vertical alignment.
WorkbookFormat
The OOXML package format, determined by the workbook content type in [Content_Types].xml. Controls which content type string is emitted for xl/workbook.xml on save.

Functions§

builtin_format_code
Map a built-in number format ID (0-49) to its format code string.
date_to_serial
Convert a NaiveDate to an Excel serial number.
datetime_to_serial
Convert a NaiveDateTime to 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 None if the ID is not a recognized built-in format.
is_date_format_code
Returns true if a custom number format string looks like a date/time format.
is_date_num_fmt
Returns true if 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.