diff --git a/ClosedXML/Excel/CustomProperties/XLCustomProperty.cs b/ClosedXML/Excel/CustomProperties/XLCustomProperty.cs index d814355..a1d4d19 100644 --- a/ClosedXML/Excel/CustomProperties/XLCustomProperty.cs +++ b/ClosedXML/Excel/CustomProperties/XLCustomProperty.cs @@ -21,6 +21,8 @@ get { return name; } set { + if (name == value) return; + if (_workbook.CustomProperties.Any(t => t.Name == value)) throw new ArgumentException( String.Format("This workbook already contains a custom property named '{0}'", value)); diff --git a/ClosedXML/Excel/Tables/XLTableField.cs b/ClosedXML/Excel/Tables/XLTableField.cs index 9b6ee39..15a2a89 100644 --- a/ClosedXML/Excel/Tables/XLTableField.cs +++ b/ClosedXML/Excel/Tables/XLTableField.cs @@ -53,6 +53,8 @@ } set { + if (name == value) return; + if (table.ShowHeaderRow) (table.HeadersRow(false).Cell(Index + 1) as XLCell).SetValue(value, false); diff --git a/ClosedXML/Excel/XLWorksheet.cs b/ClosedXML/Excel/XLWorksheet.cs index 6be26bb..01c1007 100644 --- a/ClosedXML/Excel/XLWorksheet.cs +++ b/ClosedXML/Excel/XLWorksheet.cs @@ -171,6 +171,8 @@ get { return _name; } set { + if (_name == value) return; + if (String.IsNullOrWhiteSpace(value)) throw new ArgumentException("Worksheet names cannot be empty");