Data types for cells


Some questions about cell data types and how they work:

How does Aspose.Cells determine the data type of a cell in a spreadsheet?

Does the INT type have any meaning?

Can you set a cell so that it has a particular value type?

Does the cell type change if you apply formatting (for example format a double as a date?)

PS you've a minor documentation bug in the java api docs - Interface CellValueType DOUBLE is listed as DOULE




Hi Tim,

1 : When reading a xls file,the data type of a cell is determined by the record of the file.In running,the data type of a cell is determined by the value you set(calling Cell.setValue()).

2 : It means the cell value is Integer value.If you want to get number value of the cell, you can call Cell.getDoubleValue() method , it will return a double value if the data type is INT,DOUBLE or DATETIME and it will return null if the data type is other value type.

3 : You can't set a particular value type.And which particular value type do you need?

4 : If the cell value type is INT,DOUBLE or DATETIME,the return value type is determined by number format of the cell's style.

5 : Thanks for your info.We will fix it.