jmcnamara / rust_xlsxwriter

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

feature request: <Prevent cell from overflowing into next (empty) cell> #81

Closed claudiofsr closed 5 months ago

claudiofsr commented 5 months ago

Feature Request

Hey, good morning!

I would like cell information not to overflow into the next empty cell.

See the link: excel-prevent-cell-text-from-overflowing-into-next-empty-cell

Is it possible to support three types of text wrapping: overflow, wrap, and clipping (like Google Sheets)?

let fmt_wrap = Format::new().set_text_wrap(); (already implemented) let fmt_clip = Format::new().set_text_clip(); (prevent-cell-overflowing-into-next-empty-cell) let fmt_over = Format::new().set_text_over(); (I don't know the use)

jmcnamara commented 5 months ago

@claudiofsr Option 1 is already implemented (as you note). Option 3 is also already implemented as the FormatAlign::Fill property.

Option 2 can't be implemented because it doesn't exist as an option in Excel or the file format.

See the link: excel-prevent-cell-text-from-overflowing-into-next-empty-cell

All the solutions given in that thread are workarounds that you could already use with rust_xlsxwriter although none of them are great options from my viewpoint.

So I am going to have to close this as "can't fix" since this isn't an Excel file format addition that I can add.