Description
Read and complete the full issue template
Do you want to request a feature or report a bug?
- Bug
- Feature
- Question
Did you test against the latest CI build?
- Yes
- No
Version of ClosedXML
0.102.2
What is the current behavior?
Previously defined DataValidation gets changed after calling the following method:
ClosedXML.Excel.IXLCell :
IXLTable InsertTable(IEnumerable data, string tableName, bool createTable);
AllowedValues = "List" ===> this is being changed to "AnyValue"
Value = [my named range] ===> this is being changed to ""
Ranges = {Entities!H2:H1048576} ===> this is being changed to {Entities!H3:H3}
What is the expected behavior?
Previously defined DataValidation should be kept as is, after calling the InsertTable method.
AllowedValues should continue to be "List"
Value should continue to be [my named range]
Ranges should continue to be {Entities!H2:H1048576}
Is this a regression from the previous version?
Unknown
Reproducibility
DataValidation got changed from "List" to "AnyValue" (see debugging screen prints attached)
before calling InsertTable:
AllowedValues = List,
Ranges = {Entities!H2:H1048576},
Values = rngEntityTypes (named Range)
after calling InsertTable:
AllowedValues = AnyValue,
Ranges = {Entities!H2:H3},
Values = ""
Code to reproduce problem:
public void Main()
{
var table = worksheet.Cell(startCell.Address).InsertTable(contentList, "MyTable", false);
}