MathNya / umya-spreadsheet

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

X14 Data validation reference sequence only keep first cell #222

Open Aeradriel opened 2 months ago

Aeradriel commented 2 months ago

Hello,

Using an excel file with x14 data validation, it appears that opening and saving the file leads to data validation only kept on the first cell of the range. By looking a bit into the code, it appears that in the DataValidation struct (of the office2010/excel module), the reference sequence contains only one coordinate (vs a range in the "classic" data validation). As you can see below, I am correctly having a range in my excel file. It looks like a bug to me but if I'm doing something wrong, feel free to point me to the right direction.

DataValidation "classic"

image

DataValidation office2010/excel

image

Excel data validation example

<x14:dataValidation type="list" allowBlank="1" showInputMessage="1" showErrorMessage="1" xr:uid="{00000000-0002-0000-0100-000008000000}">
    <x14:formula1>
        <xm:f>Lists!$F$2:$F$31</xm:f>
    </x14:formula1>
    <xm:sqref>H6:H999 J6:J999 M6:M999</xm:sqref>
</x14:dataValidation>
MathNya commented 2 months ago

@Aeradriel Thank you for your report. We have checked and found it to be a bug. We will address it in the next update.

MathNya commented 1 month ago

The latest version has been released. Please confirm that the problem has been fixed.