excelstream 0.20.2

High-performance streaming Excel & CSV library with S3/GCS cloud support and Parquet conversion - Ultra-low memory usage
Documentation
//! # excelstream
//!
//! A high-performance Rust library for streaming Excel import/export operations.
//!
//! ## Features
//!
//! - **Streaming Read**: Read large Excel files without loading entire file into memory
//! - **Streaming Write**: Write millions of rows with constant ~80MB memory usage
//! - **Formula Support**: Write Excel formulas that calculate correctly
//! - **High Performance**: 30K-45K rows/sec throughput with streaming
//! - **Better Errors**: Context-rich error messages with debugging info
//! - **Multiple Formats**: Support for XLSX, XLS, ODS formats
//! - **Type Safety**: Strong typing with Rust's type system
//! - **Zero-copy**: Minimize memory allocations where possible
//!
//! ## Quick Start
//!
//! ### Reading Excel Files (Streaming)
//!
//! ```rust,no_run
//! use excelstream::streaming_reader::StreamingReader;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let mut reader = StreamingReader::open("data.xlsx")?;
//!
//! for row_result in reader.rows("Sheet1")? {
//!     let row = row_result?;
//!     println!("Row: {:?}", row);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! ### Writing Excel Files (Streaming)
//!
//! ```rust,no_run
//! use excelstream::writer::ExcelWriter;
//! use excelstream::types::CellValue;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let mut writer = ExcelWriter::new("output.xlsx")?;
//!
//! // Write header
//! writer.write_header(&["Name", "Age", "City"])?;
//!
//! // Write data rows with typed values
//! writer.write_row_typed(&[
//!     CellValue::String("Alice".to_string()),
//!     CellValue::Int(30),
//!     CellValue::String("New York".to_string()),
//! ])?;
//!
//! // Write with formulas
//! writer.write_row_typed(&[
//!     CellValue::String("Total".to_string()),
//!     CellValue::Formula("=COUNT(B2:B10)".to_string()),
//!     CellValue::Empty,
//! ])?;
//!
//! writer.save()?;
//! # Ok(())
//! # }
//! ```

pub mod error;
pub mod fast_writer;
pub mod streaming_reader;
pub mod types;
pub mod writer;

// CSV support
pub mod csv;
pub mod csv_reader;
pub mod csv_writer;
pub mod http_csv_writer;

// Cloud storage integration (optional)
#[cfg(any(
    feature = "cloud-s3",
    feature = "cloud-gcs",
    feature = "cloud-azure",
    feature = "cloud-http"
))]
pub mod cloud;

// Parquet support (optional)
#[cfg(feature = "parquet-support")]
pub mod parquet;

// Incremental append mode
pub mod append;

pub use error::{ExcelError, Result};
pub use streaming_reader::StreamingReader as ExcelReader; // Re-export for backward compatibility
pub use types::{Cell, CellStyle, CellValue, ProtectionOptions, Row, StyledCell};
pub use writer::ExcelWriter;

// CSV exports
pub use csv::CompressionMethod;
pub use csv_reader::CsvReader;
pub use csv_writer::CsvWriter;
pub use http_csv_writer::HttpCsvWriter;

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_library_imports() {
        // Test that all public types are accessible
        let _ = std::marker::PhantomData::<ExcelError>;
        let _ = std::marker::PhantomData::<ExcelReader>;
        let _ = std::marker::PhantomData::<ExcelWriter>;
    }
}