Closed
Description
Description
The introduced new CellValue(bool) uses the wrong serialization causing Excel to fail to load the file.
Information
- .NET Target: all
- DocumentFormat.OpenXml Version: since 2.12-ish (Add validation to CellType for number and date types #782)
Repro
Debug.Assert(new CellValue(true).InnerText == "true");
Observed
Spec expects the boolean values to be "true" or "false" but the code is using bool.ToString() which returns "True" or "False".
Expected
Per .NET remarks for the boolean.ToString:
This method returns the constants "True" or "False".
Note that XML is case-sensitive, and that the XML specification recognizes "true" and "false" as the valid set of Boolean values. If the string returned by the ToString() method is to be written to an XML file, its String.ToLowerInvariant method should be called first to convert it to lowercase.
Metadata
Metadata
Assignees
Labels
No labels