You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some input data in a spreadsheet. The column data is 694142.01
I have no control over the formatting as the spreadsheet is created by an external system. When I do reader.GetString(0) on that file is throws an exception "Unable to cast object of type 'System.Double' to type 'System.String'."
I don't really care that the data can be treated as a double. I want it as a string. Why does reading the data as a string cause it to throw an error?
The text was updated successfully, but these errors were encountered:
It isn't solved, particularly for dates. For whatever reason the library decides (or perhaps it's encoded that way in xls, I don't know) to interpret strings as dates/numbers if possible. If I wanted to do that, I can trivially do so myself. What isn't trivial is getting the original raw representation - GetNumberFormatString is of no help.
I have some input data in a spreadsheet. The column data is 694142.01
I have no control over the formatting as the spreadsheet is created by an external system. When I do reader.GetString(0) on that file is throws an exception "Unable to cast object of type 'System.Double' to type 'System.String'."
I don't really care that the data can be treated as a double. I want it as a string. Why does reading the data as a string cause it to throw an error?
The text was updated successfully, but these errors were encountered: