dream-num / univer

Univer is an Isomorphic Full-Stack Framework for Creating and Editing Spreadsheets, Docs, and Slides Across Web and Server
https://univer.ai
Apache License 2.0
7.17k stars 633 forks source link

Sheet_Data_Validation_Plugin - Use different separator than " , " #4117

Open Erivess opened 4 hours ago

Erivess commented 4 hours ago

Initial checklist

Problem

Currently the univer sheet plugin works with separating different dropdown options like "formula1":"Yes,No,Maybe"

Since "," is a common symbol in text, this leads to problems in data processing when users have dropdown options like "Yes, lets do xyz" "No, lets do abc" since this would be displayed as 4 options in universheet.

I use OpenXML for parsing excel to workbook json and the raw data validation output looks like

Validation XML: <x:dataValidation type="list" allowBlank="1" showInputMessage="1" showErrorMessage="1" sqref="C10:C12" xr:uid="{69FA879E-BF58-CA46-AAF8-23AF4BAD3C8A}" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><mc:AlternateContent xmlns:x12ac="http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x12ac"><x12ac:list>"Yes,lets do xyz","No, I dont want"</x12ac:list></mc:Choice><mc:Fallback><x:formula1>"Yes,lets do xyz,No, I dont want"</x:formula1></mc:Fallback></mc:AlternateContent></x:dataValidation>

In Excel Desktop separator " ; " is used Screenshot 2024-11-21 at 08 54 22

Proposal: Use different separator for dropdown options that's not a common symbol in text.