Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to print row of excel file in perl

by Andrew Coolman (Hermit)
on Nov 11, 2008 at 10:03 UTC ( [id://722815]=note: print w/replies, xml ) Need Help??


in reply to How to print row of excel file in perl

What you can use is the Value from Range method. It could be something like this:
my $cols_pos = 'c'; my $row = 3; my $selected_range = $Sheet->Range("a${row}:${cols_pos}${row}")->{Valu +e}; $onerow = join (' ', @{$selected_range->[0]}); # 0 just because we kno +w its only one row which we want
The Range parameter is the start cell and the end cell like if you selected in Excel. So how you set row and cell position is up to you. Moreover you can get the whole table and process it in Perl array of arrays which has significant time impact then process it by rows or cells. And also the write by Range works also.
For some huge tables you can reduce the processing from several minutes to few seconds. The OLE cell access is really slow for huge tables.

Regards,
s++ą  ł˝ ął. Ş ş şą Żľ ľą˛ş ą ŻĽąş.}++y~-~?-{~/s**$_*ee

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://722815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-18 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found