MathNya / umya-spreadsheet

A pure rust library for reading and writing spreadsheet files
MIT License
294 stars 46 forks source link

Broken Formatting & Lost List Box Upon Opening and Saving Workbook #208

Open fgimian opened 3 months ago

fgimian commented 3 months ago

Hey there, firstly thank you so much for this amazing library. I find it very enjoyable and ergonomic to use.

I did discover that just opening and saving my workbook caused some trouble when text used multiple font sizes within a single cell and there was a list box present.

Here's the code:

use std::{path::Path};

fn main() {
    let path = Path::new(r"C:\Users\Fots\Downloads\Book.xlsx");
    let mut book = umya_spreadsheet::reader::xlsx::read(path).unwrap();

    let path = Path::new("out.xlsx");
    umya_spreadsheet::writer::xlsx::write(&book, path).unwrap();
}

And here's a sample spreadsheet.

Book.xlsx

Here's how the original looks:

image

And how it looks after being opened and saved with the library:

image

Thanks heaps in advance! Fotis

P.S.: I can confirm that other developer controls such as buttons are lost too.

MathNya commented 3 months ago

Thank you for your report. We will proceed to investigate and address the cause of the problem.

MathNya commented 3 months ago

Fixed a bug related to text values. The developer control object is currently not supported. We will try to support it in the next update.