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
Hi, I am opening a spreadsheet and looking for particular namedrange say "PeopleData"

a recent change to the spreadsheet template has updated the name to "AllPeopleData"

I want to check on runtime that if "PeopleData" doesn't exist use the other namedrange "AllPeopleData"

I have to keep both for compatibility purpose...
c#

if (Workbook.NamedRanges.Contains("PeopleData"))
   use this 
else
   use "AllPeopleData"

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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