Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: NamedRanges.Contains pick other NamedRange if one doesnt exist

$
0
0
Thanks MDeLeon but the codes you've provided are still throwing following exceptions

var range1 = ws.NamedRange("Bad");
ex = {"The given key was not present in the dictionary."}

var contains1 = ws.NamedRanges.Contains("Bad");
ex = {"Index was outside the bounds of the array."}

At the moment I've done a work around by getting all NamedRanges in a string collection then doing a Contains

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>