IntValue?

Cell.Type returns “CellValueType.IsNumeric” as type of cell value, but how to identify whether is it int or double value?
Also how Cell.IntValue works if type of cell value is not numeric, e.g.: boolean, string or datatime? throw exception or make conversion to int?
The same question for other typed methods: DoubleValue, FloatValue, BoolValue, StringValue and so on. Do they conversion, how or throw exception if real type is different? Could you add this information in documentation?

Thanks

@23W,
I have tested the scenario and following are the observations:

Cell Value Cell.Type
1 IsNumeric
1.1 IsNumeric
TRUE IsBool
Cell Value Cell.IntValue
TRUE Exception: Not a numeric value in cell
“Hello” Exception: Not a numeric value in cell
DateTime.Now 43615 (Its number of days since 1/1/1900
Cell Value Cell.DoubleValue
TRUE Exception: Not a numeric value in cell
“Hello” Exception: Not a numeric value in cell
DateTime.Now 43615.9780 (Its number of days since 1/1/1900
Cell Value Cell.BoolValue
TRUE Exception: Not a numeric value in cell
“Hello” Exception: Not a numeric value in cell
DateTime.Now 43615.9780 (Its number of days since 1/1/1900
Cell Value Cell.StringValue
TRUE Exception: Not a numeric value in cell
“Hello” Hello
DateTime.Now 43615.9780 (Its number of days since 1/1/1900

You may please try the same scenario using Excel and note that when a particular value is entered in a cell and cell type is changed, the value changes accordingly. Excel does not suggest any particular type when a value is entered as if you enter 1 or 1.1, it is shown as Numeric. So Aspose.Cells mimics the behavior of Excel and if you find some issue while accessing these properties, please share sample template file and sample code with us. We will try to provide assistance accordingly.

Regarding adding this information in documents, it seems that there are huge possible combinations and may not be documented.

Thank you. It’s useful information it could be cool to see it in the documentation.
I think there is mistake in your table for Cell.StringValue method, it have not to throw exception for “Hello” value.

@23W,
Thank you for pointing out the mistake in the table. I have corrected it on the sample place to keep the entire information intact. We will consider making this data part of our documents.