in reply to Re: How to extract data from Excel by using Win32 OLE
in thread How to extract data from Excel by using Win32 OLE

Hi John, I changed to the upcase, but it still kept same, so I think this is not my problem. I think my co-ordinations, as specified in $row_num and $label_hash_ref->{'alt'}, are right because nearby values in different columns are extracted correctly. Because it is the only line to extract data from Excel files, I am still not sure how to do next. Thanks in advance.
  • Comment on Re^2: How to extract data from Excel by using Win32 OLE

Replies are listed 'Best First'.
Re^3: How to extract data from Excel by using Win32 OLE
by davies (Monsignor) on Dec 18, 2013 at 15:32 UTC

    I can't reproduce your problem. The following code works for me:

    use strict; use warnings; use Win32::OLE; my $xl = Win32::OLE->new('Excel.Application'); $xl->{Visible} = 1; my $wb = $xl->Workbooks->Add; for my $nSht (2..$wb->Sheets->{Count}) { $wb->Sheets(2)->Delete; } my $Sheet = $wb->Sheets(1); $Sheet->Cells(2,2)->{Value} = 0.898124; print $Sheet->Cells(2,2)->Value; $xl->{DisplayAlerts} = 0; $xl->Quit;

    If you can't solve your problem from this, please post your own SSCCE (http://sscce.org/ https://web.archive.org/web/20160926072757/http://sscce.org), otherwise I, at least, will be able to do little more.

    Regards,

    John Davies