I loaded the following packages to extract information from Excel file.
use strict; use FileHandle; use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Variant; use Win32::OLE::Const 'Microsoft Excel';
However, I noticed that if the cell in Excel file contains such value "0.898124", the output instead is changed to integer type, like "0833561".
Here is my method to extract the corresponding value: $Sheet->Cells($row_num,$label_hash_ref->{'alt'})->{'Value'};I googled the answer. Someone suggested that I should use this method:
$Sheet->Cells($row_num,$label_hash_ref->{'alt'})->value();But it failed.
Then other post said this way:
Variant(VT_R8, $Sheet->Cells($row_num,$label_hash_ref->{'ESP'})->value());But it failed.
So, my question is , how to extract the original format from Excel file and keep them untouched as it was. Thanks.
In reply to How to extract data from Excel by using Win32 OLE by plagent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |