How to validate range.value2 from excel vsto
I need to read coordinates (x,y) from excel workbooks, where x coordinates are stored on column B and y on column C on worksheets. I need to read these values for further process. My problem is that I can't find a way to properly validate these values. Both columns in the worksheet are number formatted with two decimal places. Initially, I thought well this is not a big deal I will check, (Range.Value2 != Null && Range.Value2 != string.Empty), to make sure the range is not blank. As you can see on the picture below the stored data contains 0.00 values and spaces. I only need to read the ranges (cells) which contain a valid value. I don't know how many rows contain values, so I need to go down on column B until all rows containing values have been read, say stop after reading 5 blank rows. My initial validation check generated errors like "Operator != cannot be applied to operands of type double and string" I also tried many combinations of checks and I have not been able to find one that I can use. Please if anyone can suggest a way to do this properly, I will be greatly appreciated.