roo-rb / roo

Roo provides an interface to spreadsheets of several sorts.
MIT License
2.78k stars 501 forks source link

Fix issue #593 #594

Open akshay-vashishtha opened 1 year ago

akshay-vashishtha commented 1 year ago

The solution to the open issue is mentioned at https://github.com/roo-rb/roo/issues/593#issue-1746255528. To address the problem when using an Excel file with a custom data type, the roo gem was unable to convert it into an integer or float. Therefore, I made changes to the create_date mechanism to identify such cases. Now, if we encounter an exact date instead of a number, the string will be parsed using the Date parser to ensure proper conversion.

patrickkulling commented 8 months ago

@akshay-vashishtha can you please add a suite of tests to validate the previous + new behaviour

ldodds commented 8 months ago

We're encountering this issue with some dates in XLSX files. In our case, the excelx_value value for the cell is returning 2023-10-04T00:00:00. I've confirmed that the branch fixes the date parsing issue. Would be great to get this merged if possible.