I'm reading in an Excel spreadsheet using Win32::OLE.  I want to read in
the entire spreadsheet.  I found a piece of code that does that:
$everything = $sheet->UsedRange()->{Value};
for (@$everything) 
{
    for (@$_) 
    {
        print defined($_) ? "$_|" : "<undef>|";
    }

    print "\n";
}

However, I don't understand what @$everything and @$_ are; arrays,
arrays of arrays, hashes?  It looks like the entire spreadsheet goes
into $everything, which is more confusing since it is a scalar.  I'd
like to extract the second and fifth elements of a row and create a hash
out of them.
 
On another note, I have to run my script three times to get it to work.
The first time it doesn't run at all, the second time it hangs and the
third time it works properly.  I assume this is a function of the code
that starts/stops the excel application (the spreadsheet only becomes
visible on the third try).  Any ideas on this?
 
Thanks!

______________________________________________________________
Steve Gross                                                      Tel:
212-284-6558
Director of Information Technology                     Cell:
917-575-4028
JESNA                                                             Fax:
212-284-6951
www.jesna.org

 

Reply via email to