I am using Perl module Spreadsheet::DataFromExcel to read Excel files. It sounds to be a very simple interface to handle Excel file. The big problem I have is the date field like '02/09/2010' is transfered into a number '40218'. I am not sure how this number is calculated? Is there any work around for this issue? or any formula from '02/09/2010' to '40218'?
Another issue is: the contents in the parsed array of array have '\0' inserted between every two characters. so I have to remove them before using these data
Many thanks
lihao
Update:First, Many thanks to both who suggested, I've tested ww's suggestion with MySQL:
to_days('2010-02-09') - to_days('1900-01-01')
which returns 40216 (very close to the value 40218 I got)? Does anyone know of where the small difference comes from?? Many thanks again.
BTW. I am using the RHEL5 as the OS to run my Perl script.
Update: After google with Excel 1899-12-30 issue, I guess, ww's comment is right, this is a known issue with Excel. So my problem is basically solved. :-)
In reply to Question with Spreadsheet::DataFromExcel by lihao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |