1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//! xlsxzero - Pure-Rust Excel parser and Markdown converter for RAG systems
//!
//! This crate provides functionality to parse Excel files (XLSX) and convert them
//! to structured Markdown format, optimized for RAG (Retrieval-Augmented Generation) systems.
//!
//! # Quick Start
//!
//! ```rust,no_run
//! use std::fs::File;
//! use xlsxzero::ConverterBuilder;
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a converter with default settings
//! let converter = ConverterBuilder::new().build()?;
//!
//! // Open input Excel file
//! let input = File::open("example.xlsx")?;
//!
//! // Create output Markdown file
//! let output = File::create("output.md")?;
//!
//! // Convert Excel to Markdown
//! converter.convert(input, output)?;
//!
//! Ok(())
//! }
//! ```
//!
//! For in-memory conversion, use `Cursor`:
//!
//! ```rust,no_run
//! use std::io::Cursor;
//! use xlsxzero::ConverterBuilder;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let converter = ConverterBuilder::new().build()?;
//! let excel_data: Vec<u8> = vec![]; // Your Excel file bytes
//! let mut markdown_output = Vec::new();
//! converter.convert(Cursor::new(excel_data), &mut markdown_output)?;
//! # Ok(())
//! # }
//! ```
//!
//! # Custom Configuration
//!
//! ```rust,no_run
//! use std::fs::File;
//! use xlsxzero::{ConverterBuilder, SheetSelector, MergeStrategy, DateFormat};
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a converter with custom settings
//! 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(())
//! }
//! ```
//!
//! # Convert to String
//!
//! ```rust,no_run
//! 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")?;
//!
//! // Convert to String instead of writing to a file
//! let markdown = converter.convert_to_string(input)?;
//! println!("{}", markdown);
//!
//! Ok(())
//! }
//! ```
// 公開API
pub use ;
pub use ;
pub use XlsxToMdError;