Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Commented Issue: Named Ranges behaviour / bugs [13635]

$
0
0
Hi there, I started using the code library and encountered some unexpected behaviour. My workaround exposed other issues, which I've fixed on my end. I'm not sure what to do about posting changes, so I thought I'd start here.

Our application uses pre-made Excel files that we configure and sets cell values via Named Ranges.

1. When inserting rows (and presumably columns), Named ranges are not moved as they would if you were actually in Excel.
2. I added code in my application to find the Named ranges that would be affected by a row insert and adjusted them accordingly.
3. If there were any Named Ranges with #Ref! errors (since the cells / sheet they referred to were removed), checking the ExcelCellAddress.Start value threw and exception.
4. I tried ExcelRange.IsValidCellAddress(address), but this also threw an exception because the internal method GetRowColFromAddress throws an exception if the address doesn't parse.
5. In my copy of the source code, I added exception handling inside IsValidCellAddress so an exception is interpreted as a false result.
6. This works for dealing with invalid names in a workbook.
7. In our application we create Named Ranges for the data we 'pump' into a Data Sheet in the workbook, and most of the invalid #Ref! ranges above are the names that got pumped in before and have been deleted. But when the data is being pumped in, we set the Named Range again.
8. The ExcelNamedRangeCollection.Add method didn't check that the Name already exists, so setting the Name threw an Exception. I modified this to either Add or Update the dictionary value.
9. Finally, this is the first Open-Source project I've used from the source code. So, I'm not sure how to proceed with these changes. Should I send you the code modifications?

Thanks,

John
Comments: John, Can you please send the changes to shahadarsh@gmail.com? It would be a great help. Thanks, Adarsh

Viewing all articles
Browse latest Browse all 2262

Trending Articles



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