Cell Text Property Incorrectly Returning Blank String

Mar 22, 2012 at 8:24 PM

Using current version.  I'm reading in / writing out data.  My input spreadsheet is plain text data; all columns general text.  My output was blank when my input cells contained '0'.  In debugging, I found that any time I examined the Text property of the ExcelRangeBase object (by hovering over it and scrolling down to the Text property), it showed correct.  Once the debugger hit the object, it was populated correctly and the output contained the zeros.  If the object hadn't been touched by the debugger, however, the output was blank.

Note that there was no timing issue.  Setting breakpoints or inserting sleep times had no effect.  Only examining the property of the individual cells with the debugger changed the output.

When I switched to using value.ToString() I got the data correctly, but this sure seems like a problem (how many other values would produce this?).  How is this even possible?  You can imagine how this debug session went...