excel_add_sheet
A Rust library for adding worksheets to existing Excel (XLSX) files.
Features
- Add new worksheets to existing
.xlsxfiles - Insert data into new worksheets (2D string arrays)
- Save modified workbooks to new or existing files
- List files inside an XLSX archive
- Minimal dependencies: only
zip,quick-xml, andtempfile
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
Usage
Add a Worksheet to an Existing File
use ExcelDoc;
List Files in an XLSX Archive
use ExcelDoc;
Overwrite an Existing File
use ExcelDoc;
API Overview
ExcelDoc
ExcelDoc::open(path) -> Result<ExcelDoc, _>: Open an existing XLSX file for modification.add_worksheet(name, data): Add a worksheet with a given name and optional 2D string data.add_blank_worksheet(name): Add a blank worksheet.save(path): Save the modified document to a file.print_file_list(path): Print the list of files in the XLSX archive.
ExcelWorkbook and Worksheet
For advanced manipulation, you can use the ExcelWorkbook and Worksheet structs to work with sheets and cells directly.
License
MIT License. See LICENSE for details.
Author: Joey Clemens (joeyclemens@tuta.io)