You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening an .xlsx spreadsheet with data validations that was created with LibreOffice, the AllowBlank and ShowErrorMessage properties of any ExcelDataValidation will always be false even if they are in fact enabled in the document.
The spreadsheet was created with LibreOffice 24.8.3 which is the most recent version and the version of EPPlus used is 5.7.1 (.NET Framework).
Attached is a minimalist .xlsx file containing a single data validation for the cells of column B. As can be seen on the screenshots below the Allow empty cells and Show error message when invalid values are entered are both checked. The following code, however, will print out false for both properties:
using OfficeOpenXml;using System;namespaceTest{classProgram{staticvoidMain(){using(varp=new ExcelPackage("Test.xlsx")){foreach(var v in p.Workbook.Worksheets[0].DataValidations){
Console.WriteLine(v.AllowBlank);
Console.WriteLine(v.ShowErrorMessage);}}}}}
It appears that when we read the property in the xml we check if it's set to 1. It appears LibreOffice sets this to true. A fix has been made and will be in a future version,
It appears that when we read the property in the xml we check if it's set to 1. It appears LibreOffice sets this to true. A fix has been made and will be in a future version,
EPPlus usage
Noncommercial use
Environment
Windows
Epplus version
7.5.1
Spreadsheet application
Excel xlsx
Description
When opening an .xlsx spreadsheet with data validations that was created with LibreOffice, the
AllowBlank
andShowErrorMessage
properties of anyExcelDataValidation
will always befalse
even if they are in fact enabled in the document.The spreadsheet was created with LibreOffice 24.8.3 which is the most recent version and the version of EPPlus used is 5.7.1 (.NET Framework).
Attached is a minimalist .xlsx file containing a single data validation for the cells of column B. As can be seen on the screenshots below the
Allow empty cells
andShow error message when invalid values are entered
are both checked. The following code, however, will print outfalse
for both properties:Test.xlsx
The text was updated successfully, but these errors were encountered: