jmcnamara / rust_xlsxwriter

A Rust library for creating Excel XLSX files.
https://crates.io/crates/rust_xlsxwriter
Apache License 2.0
316 stars 25 forks source link

Iterate `Worksheet.table` instead of indexing #26

Closed adriandelgado closed 1 year ago

adriandelgado commented 1 year ago

The main change is a refactor of the write_data_table and calculate_spans functions. This required to change the Worksheet.table to use BTreeMaps because we need the keys to be ordered.

Some secondary changes were made to the functions inside the main loop of write_data_table.

image

Note: the code in calculate_spans is still indexing the rows. I wasn't sure if I could safely change it to an iteration.

jmcnamara commented 1 year ago

Overall looks good and not far off merge.

jmcnamara commented 1 year ago

Merged. Thanks.