`Row.set_height` method not work?
Here my simple code:
let mut book = new_file_empty_worksheet();
let sheet = book.new_sheet("sheet1").unwrap();
sheet
.get_cell_mut((1, 1))
.set_value_string("Merry Christmas!")
.get_style_mut()
.get_font_mut()
.set_bold(true)
.set_name("Arial")
.set_size(18.0);
sheet
.add_merge_cells("A1:F1")
.get_row_dimension_mut(&1)
.set_height(24.0);
writer::xlsx::write(&book, "greet.xlsx").unwrap();
then I got:
seems that set_height not work, or did I miss something else?
@PleaseDont Thank you for your message. I tried the code you provided, and the height became 20. It appears to be working fine. (I used umya-spreadsheet version 2.3.3.)
If the issue persists, please send us the Excel file. We will analyze it.
@MathNya Thank you for replying.
I test again on my Windows 11 PC, and got this:
On macOS 26 Macbook M1 is:
Then I unzip the file, and I found
So, sorry about my mistake, it works well.
The stored values in the document may display differently across different computer systems, and I need to figure out why this happens, thank you.
@MathNya Check xlsx_demo please.
@PleaseDont I checked the Excel file at the specified URL, but the row height still appears as 24 in my environment. Functionality was verified on Windows 11 using Excel, ONLYOFFICE, and WPS Office.
I also checked the contents of the unzipped XML file but found no entries that seemed likely to cause the issue.
@MathNya
That's so weird.
I install ONLYOFFICE and everything seems just fine. My Excel broken?
But I still wonder why rust_xlsxwriter works properly for my computer.
Never mind, maybe I'll figure out exactly what went wrong later.
Thank you.