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

ExcelCellBase.IsValidAddress(string address) not working correctly #65

Closed
ghost opened this issue Nov 22, 2017 · 0 comments
Closed

ExcelCellBase.IsValidAddress(string address) not working correctly #65

ghost opened this issue Nov 22, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 22, 2017

The static method ExcelCellBase.IsValidAddress(string address) accepts as a valid Range address the following strings:

  1. $A12:XY1:3
  2. $A12:X$Y$13

for the first string the problem is that there is no check if the chracter ':' that is found is the only one.
I would suggest the following solution:
near line 763 change the following code:
else if (address[i] == ':') { isSecond=true; }
to
else if (address[i] == ':') { if (isSecond) return false; isSecond=true; }

For the second string more checks must be added before deciding that it is safe to ignore the '$' character.

Best regards,
Ivan Temelkov

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants