Article Details
Id:20270
Product:finPOWER Connect
Type:NEW
Version:4.00.02
Opened:11/05/2023
Closed:11/05/2023
Released:27/06/2023
Job: J031061

ISExcelWorkbook; Opening CSV Files now does not parse Numbers

The ISExcelWorkbook.Open function now does not parse numbers for CSV files.

When opening a CSV (Comma Separate Value) File, numbers were automatically parsed either as an Integer or Double. Excel does not support Long or Decimal data types.

This means a Credit Card number like "4005550987654321" is converted to a Double value. Since Double values are limited to 15 digit precision, the cell value is actually "4005550987654320" (notice the final digit is lost). In addition, since the Number Format is "General" its String value is "4.00555E+15".

Another example is 9,223,372,036,854,775,299 (Long.MaxValue) which was loaded as a Double 9,223,372,036,854,780,000.

Now, when opening a CSV file, Numbers are no longer parsed, i.e. they are treated as Strings. This avoids this type of issue.

NOTE: Using the IsExcelCell.Get functions, such as GetLong and GetDecimal will convert the string value to the correct data type.