Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Named cells validation #529

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion EPPlus/ExcelNamedRangeCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ internal ExcelNamedRangeCollection(ExcelWorkbook wb, ExcelWorksheet ws)
public ExcelNamedRange Add(string Name, ExcelRangeBase Range)
{
ExcelNamedRange item;
if(!ExcelAddressUtil.IsValidName(Name))

if (!ExcelAddressUtil.IsValidName(Name))
{
throw (new ArgumentException($"Name {Name} contains invalid characters")); //Issue 458
//Name = ExcelAddressUtil.GetValidName(Name); //temporary fix

}
if (Range.IsName)
{
Expand Down
Loading