excel2df 0.1.5

A library for converting Excel files to Polars DataFrame.It supports multiple threads to improve performance.
Documentation
use quick_xml::Reader as XmlReader; // Ensure correct imports
use std::io::BufReader;
use zip::read::{ZipArchive, ZipFile};

use crate::cellvalue::{Cell, CellFormat, Row};
use crate::wb::DateSystem;

#[derive(Debug)]
pub struct Worksheet {
    pub name: String,
    pub position: u8,
    relationship_id: String,
    /// location where we can find this worksheet in its xlsx file
    pub target: String,
    sheet_id: u8,
}

pub struct SheetReader<'a> {
    pub reader: XmlReader<BufReader<ZipFile<'a>>>, // Specify the generic type explicitly
    pub strings: &'a [String],
    pub styles: &'a [CellFormat],
    pub date_system: &'a DateSystem,
}

impl<'a> SheetReader<'a> {
    pub fn new(
        reader: XmlReader<BufReader<ZipFile<'a>>>,
        strings: &'a [String],
        styles: &'a [CellFormat],
        date_system: &'a DateSystem,
    ) -> Self {
        SheetReader {
            reader,
            strings,
            styles,
            date_system,
        }
    }
}

impl Worksheet {
    /// Create a new worksheet. Note that this method will probably not be called directly.
    /// Instead, you'll normally get a worksheet from a `Workbook` object.
    pub fn new(
        relationship_id: String,
        name: String,
        position: u8,
        target: String,
        sheet_id: u8,
    ) -> Self {
        Worksheet {
            name,
            position,
            relationship_id,
            target,
            sheet_id,
        }
    }
}