| Crates.io | xlsxzero |
| lib.rs | xlsxzero |
| version | 0.1.0 |
| created_at | 2025-11-21 15:42:34.303972+00 |
| updated_at | 2025-11-21 15:42:34.303972+00 |
| description | Pure-Rust Excel parser and Markdown converter for RAG systems |
| homepage | |
| repository | https://github.com/siska-tech/xlsxzero |
| max_upload_size | |
| id | 1943731 |
| size | 610,394 |
Pure-Rust Excel parser and Markdown converter for RAG systems.
xlsxzero is a high-performance, memory-efficient Rust crate designed to parse Excel files (XLSX format) and convert them into structured Markdown format. It is optimized for RAG (Retrieval-Augmented Generation) systems that require efficient processing of large Excel files.
Add this to your Cargo.toml:
[dependencies]
xlsxzero = "0.1.0"
use std::fs::File;
use xlsxzero::ConverterBuilder;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let input = File::open("example.xlsx")?;
let output = File::create("output.md")?;
ConverterBuilder::new()
.build()?
.convert(input, output)?;
Ok(())
}
use std::fs::File;
use xlsxzero::{ConverterBuilder, SheetSelector, MergeStrategy, DateFormat};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let converter = ConverterBuilder::new()
.with_sheet_selector(SheetSelector::Index(0)) // First sheet only
.with_merge_strategy(MergeStrategy::HtmlFallback) // HTML for merged cells
.with_date_format(DateFormat::Custom("%Y年%m月%d日".to_string())) // Japanese format
.build()?;
let input = File::open("example.xlsx")?;
let output = File::create("output.md")?;
converter.convert(input, output)?;
Ok(())
}
use std::fs::File;
use xlsxzero::ConverterBuilder;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let converter = ConverterBuilder::new().build()?;
let input = File::open("example.xlsx")?;
let markdown = converter.convert_to_string(input)?;
println!("{}", markdown);
Ok(())
}
The repository includes several example programs demonstrating different use cases:
examples/basic_conversion.rs): Simple file-to-file conversionexamples/custom_config.rs): Using advanced configuration optionsexamples/cli_tool.rs): Building a command-line toolRun an example:
cargo run --example basic_conversion -- input.xlsx output.md
cargo run --example custom_config -- input.xlsx output.md
cargo run --example cli_tool -- input.xlsx output.md --sheet-index 0
This project is currently in early development. Phase I features are being implemented.
Licensed under either of:
at your option.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines and the issue list for development tasks.
Full API documentation is available at docs.rs/xlsxzero (when published) or by running:
cargo doc --open