Hi,
Can you please confirm whether the below statements are true
-
Aspose reads all the numeric values set in XLS as double.
(Ex: Integer value 1 set in xls is read as 1.0 in aspose.
Double value 1.1 set in xls is read as the same double(1.1) in aspose).
-
Aspose reads all the numeric values set in XLSX as the way it is set in XLSX.
(Ex: Integer value 1 set in xls is read as Integer 1 in aspose
Double value 1.1 set in xls is read as Double 1.1 in aspose)
We arrived at the above statements by validating the object with instance of double and integer in both xls and xlsx.
Can you please confirm whether the above said are true?
If true, why there is difference in xls and xlsx in reading the values.
Note:- aspose-cells-8.3.2 was used to check this.
Thanks.
Venkat
@KarthikeyanPalanisam
Thanks for using Aspose APIs.
For xls file format, data is saved with type and there are different types for int and double. However, int value can also be saved as double. When reading data from the xls file, we do not check the value type again. If one int value has been saved as “int” in the file, then it will be int in cells model. If the int value has been saved as double in the file, then we take it as double in cells model. Commonly int value will be kept as int in the generated xls file, just as your findings. But there is no any guarantee and user should not determine the business logic depending on this.
For xlsx file, values are just saved as text and we will try to parse them into int or double while reading the template file. We cannot give guarantee that the logic of parsing those values will never be changed.