Skip to main content

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§

cell
Cell value types and date serial helpers, also available at the crate root.
chart
Chart configuration types, also available at the crate root.
comment
Comment configuration types, also available at the crate root.
conditional
Conditional formatting types, also available at the crate root.
doc_props
Document property types, also available at the crate root.
hyperlink
Hyperlink types, also available at the crate root.
image
Image types, also available at the crate root.
page_layout
Page layout types, also available at the crate root.
pivot
Pivot table types, also available at the crate root.
protection
Workbook protection types, also available at the crate root.
sheet
Sheet protection, view, and visibility types.
stream
Streaming writer types.
style
Style types, also available at the crate root.
table
Table configuration types, also available at the crate root.
utils
Utility functions for cell reference conversion.
validation
Data validation types, also available at the crate root.
vba
VBA project types, also available at the crate root.

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.
FormulaLimits
Finite limits for one formula parse, mutation, or calculation operation.
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.
OpenLimits
Finite limits applied to one workbook-open operation.
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.
ResourceLimitError
Stable, bounded metadata for a resource exhaustion error.
RichTextRun
A single formatted text segment within a rich text cell.
SaveLimits
Finite limits for one workbook save operation.
SaveOptions
Durability policy for one path save.
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.
StreamLimits
Finite limits for one streamed-sheet construction operation.
StreamWriter
A streaming worksheet writer that writes rows directly to a temp file.
Style
User-facing style definition.
TableColumn
A column within a table.
TableConfig
Configuration for creating a table.
TableInfo
Metadata about an existing table, returned by list/get operations.
ThreadedCommentData
Output data for a threaded comment.
ThreadedCommentInput
Input configuration for adding a threaded comment.
TraversalLimits
Finite resource limits shared by worksheet traversal operations.
TraversalOptions
Options controlling one worksheet traversal.
VbaLimits
Finite limits applied to one VBA extraction operation.
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.
CsvFormulaPolicy
Policy for text that spreadsheet applications may interpret as a formula.
CustomPropertyValue
Value type for custom properties.
DateInterpretation
Controls how number cells carrying a date-like number format are returned.
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.
ResourceCategory
The subsystem whose resource budget was exhausted.
ResourceDimension
The independently bounded resource dimension that was exhausted.
ResourceOperation
The public operation that exhausted a resource budget.
ResourceStage
The optional processing stage at which exhaustion was detected.
ShapeType
Preset geometry shape types supported by OOXML.
SparklineType
Sparkline type.
StyleColor
Color specification.
TraversalMode
Traversal layout policy.
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.

Constants§

MAX_CSV_OUTPUT_BYTES
Maximum bytes returned by one CSV serialization.

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.
serialize_csv
Serializes sparse typed rows as spreadsheet-safe CSV.
serialize_csv_with_policy
Serializes sparse typed rows as RFC 4180 CSV with an explicit policy.

Type Aliases§

Result
A convenience alias used throughout the crate.