This project has moved and is read-only. For the latest updates, please go here.

.NET error when a range name contains _ underscore

Aug 25, 2012 at 7:39 PM

When I do following (with several variations of the string)

$worksheet.Names.Add("Janus_ABC",$KolB) | out-null

I always get a "Exception calling "Add" with "2" argument(s): "An item with the same key has already been added.""

This only happens when the _ is in the name string. This is a legal character in Excel.
Is this a bug or am I overlooking something?
 I do not have anything named similarly in my script.