How tafia/calamine works
Calamine is a read-only Rust library for opening Excel and OpenDocument spreadsheets, exposing worksheet data and Serde deserialization. The principal workflow is caller → workbook-opening API → format-specific parser → worksheet range → optional range deserializer. Format parsers also expose workbook metadata, formulas, styles, tables, hyperlinks, pictures, and VBA where supported. The graph includes the major parser and shared-runtime modules identified by the source index; unsampled implementation details and connections are omitted unless documented or referenced there.
Main entry points: xlsx/mod.rs XLSX Reader · auto.rs Auto Detection · xlsb/mod.rs XLSB Reader · xls.rs XLS Reader
Components 20
Public API
- Reader API
src/lib.rs - Auto Detection
src/auto.rs
Format Readers
- XLSX Reader
src/xlsx/mod.rs - XLSX Cell Reader
src/xlsx/cells_reader.rs - XLSX Style Parser
src/xlsx/style_parser.rs - XLSB Reader
src/xlsb/mod.rs - XLSB Cell Reader
src/xlsb/cells_reader.rs - XLS Reader
src/xls.rs - ODS Reader
src/ods.rs
Shared Parsing
- Compound Files
src/cfb.rs - XML Attributes
src/attrs.rs - Parsing Utilities
src/utils.rs - OLE Properties
src/oleps.rs - VBA Projects
src/vba.rs
Data and Metadata
- Worksheet Ranges
src/lib.rs - Cell Values
src/datatype.rs - Number Formats
src/formats.rs - Cell Styles
src/style.rs - Range Deserializer
src/de.rs
Other components
- Library Caller
Connections 29
- Library Caller → Reader API: opens workbook
README.md - Reader API → Auto Detection: supports auto-open
README.md - Reader API → Worksheet Ranges: requests sheet range
README.md - Worksheet Ranges → Range Deserializer: deserializes range
README.md - Auto Detection → XLSX Reader: dispatches by format
- Auto Detection → XLSB Reader: dispatches by format
- Auto Detection → XLS Reader: dispatches by format
- Auto Detection → ODS Reader: dispatches by format
- XLSX Reader → XLSX Cell Reader: uses cell reader
src/xlsx/mod.rs - XLSX Reader → XLSX Style Parser: uses style parser
src/xlsx/mod.rs - XLSB Reader → XLSB Cell Reader: uses cell reader
src/xlsb/mod.rs - XLSX Reader → XML Attributes: parses attributes
src/xlsx/mod.rs - XLSB Reader → XML Attributes: parses attributes
src/xlsb/mod.rs - ODS Reader → XML Attributes: parses attributes
src/ods.rs - XLSX Reader → Number Formats: classifies number formats
src/xlsx/mod.rs - XLS Reader → Number Formats: classifies number formats
src/xls.rs - XLSB Reader → Number Formats: classifies number formats
src/xlsb/mod.rs - XLSX Reader → Cell Styles: parses styles
src/xlsx/mod.rs - XLSX Style Parser → Cell Styles: builds style data
src/xlsx/style_parser.rs - XLSX Cell Reader → XML Attributes: reads XML attributes
src/xlsx/cells_reader.rs - XLS Reader → Compound Files: reads compound file
src/xls.rs - XLS Reader → OLE Properties: reads properties
src/xls.rs - OLE Properties → Compound Files: reads compound file
src/oleps.rs - VBA Projects → Compound Files: decompresses streams
src/vba.rs - Compound Files → Parsing Utilities: uses binary helpers
src/cfb.rs - XLSX Reader → VBA Projects: exposes VBA project
src/xlsx/mod.rs - XLSB Reader → VBA Projects: exposes VBA project
src/xlsb/mod.rs - XLS Reader → VBA Projects: exposes VBA project
src/xls.rs - Reader API → Cell Values: exposes cell types
src/lib.rs