Skip to content

Commit

Permalink
release: 0.79.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Oct 4, 2024
1 parent 2a37e52 commit e95fe80
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 13 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ This is the changelog/release notes for the `rust_xlsxwriter` crate.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.79.0] - 2024-10-04

- Added support for files larger than 4GB.

The `rust_xlsxwriter` library uses the [zip.rs] crate to provide the zip
container for the xlsx file that it generates. The size limit for a standard
zip file is 4GB for the overall container or for any of the uncompressed files
within it. Anything greater than that requires [ZIP64] support. In practice
this would apply to worksheets with approximately 150 million cells, or more.

See [`Workbook::use_zip_large_file()`].

[`Workbook::use_zip_large_file()`]: https://docs.rs/rust_xlsxwriter/latest/rust_xlsxwriter/workbook/struct.Workbook.html#method.use_zip_large_file

[zip.rs]: https://crates.io/crates/zip/2.2.0
[ZIP64]: https://en.wikipedia.org/wiki/ZIP_(file_format)#ZIP64


## [0.78.0] - 2024-10-01

- Added support for [constant memory] mode to reduce memory usage when writing
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/jmcnamara/rust_xlsxwriter"
keywords = ["excel", "xlsx"]
readme = "README.md"
license = "MIT OR Apache-2.0"
version = "0.78.0"
version = "0.79.0"
edition = "2021"
rust-version = "1.73.0" # For zip.rs compatibility.

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ currently supported features are:
- Worksheet Tables.
- Serde serialization support.
- Support for macros.
- Memory optimization mode for writing large files.


`rust_xlsxwriter` is under active development and new features will be added
frequently.
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
//! - Autofilters.
//! - Worksheet Tables.
//! - Support for macros.
//! - Memory optimization mode for writing large files.
//!
//! [`XlsxWriter`]: https://xlsxwriter.readthedocs.io/index.html
//!
Expand Down
2 changes: 1 addition & 1 deletion src/performance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ been omitted.
|-------------------------------|-----------------------|---------------|------------------|
| `rust_xlsxwriter` with `zlib` | 1.00 | | |
| C/libxlswriter | 1.38 | 1.00 | |
| `rust_xlsxwriter`` | 1.58 | 1.14 | 1.00 |
| `rust_xlsxwriter` | 1.58 | 1.14 | 1.00 |
| Python/XlsxWriter | 6.02 | 4.36 | 3.81 |
<br>
Expand Down
33 changes: 23 additions & 10 deletions src/workbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1692,17 +1692,30 @@ impl Workbook {

/// Use zip large file/ZIP64 extensions.
///
/// The `rust_xlsxwriter` library uses the [zip] crate to provide the zip
/// container for the xlsx file that it generates.
///
/// This option instructs the zip library to use [large file/ZIP64]
/// extensions when writing very large xlsx files to allow the zip
/// container, or individual XML files within it, to be greater than 4 GB.
/// See [ZIP64] on Wikipedia for more information.
///
/// [zip]: https://crates.io/crates/zip/2.2.0
/// The `rust_xlsxwriter` library uses the [zip.rs] crate to provide the zip
/// container for the xlsx file that it generates. The size limit for a
/// standard zip file is 4GB for the overall container or for any of the
/// uncompressed files within it. Anything greater than that requires
/// [ZIP64] support. In practice this would apply to worksheets with
/// approximately 150 million cells, or more.
///
/// The `use_zip_large_file()` option enables ZIP64/large file support by
/// enabling the `zip.rs` [`large_file()`] option. Here is what the `zip.rs`
/// library says about the `large_file()` option:
///
/// > If `large_file()` is set to false and the file exceeds the limit, an
/// > I/O error is thrown and the file is aborted. If set to true, readers
/// > will require ZIP64 support and if the file does not exceed the limit,
/// > 20 B are wasted. The default is false.
///
/// You can interpret this to mean that it is safe/efficient to turn on
/// large file mode by default if you anticipate that your application may
/// generate files that exceed the 4GB limit. At least for Excel. Other
/// applications may have issues if they don't support ZIP64 extensions.
///
/// [zip.rs]: https://crates.io/crates/zip/2.2.0
/// [ZIP64]: https://en.wikipedia.org/wiki/ZIP_(file_format)#ZIP64
/// [large file/ZIP64]:
/// [`large_file()`]:
/// https://docs.rs/zip/latest/zip/write/type.SimpleFileOptions.html#method.large_file
///
/// # Parameters
Expand Down
2 changes: 1 addition & 1 deletion src/worksheet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6434,7 +6434,7 @@ impl Worksheet {
/// The `set_column_width()` method is used to change the default width of a
/// worksheet column.
///
/// The ``width`` parameter sets the column width in the same units used by
/// The `width` parameter sets the column width in the same units used by
/// Excel which is: the number of characters in the default font. The
/// default width is 8.43 in the default font of Calibri 11. The actual
/// relationship between a string width and a column width in Excel is
Expand Down

0 comments on commit e95fe80

Please sign in to comment.