Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

How di I print the page header/footer from an excel spreadsheet

by boat73 (Scribe)
on Nov 08, 2006 at 17:00 UTC ( #582925=perlquestion: print w/ replies, xml ) Need Help??
boat73 has asked for the wisdom of the Perl Monks concerning the following question:

I can open a doc and read from the rows/columns but as yet can't figure out how to read the page header. Does anyone have an example?

Comment on How di I print the page header/footer from an excel spreadsheet
Re: How do I print the page header/footer from an excel spreadsheet
by Albannach (Prior) on Nov 08, 2006 at 18:01 UTC
    my $Book = $Excel->Workbooks->Open('test.xls'); my $Sheet = $Book->Worksheets("Sheet1"); $Sheet->Activate(); for my $position ( qw( Header Footer ) ) { for my $element ( qw( Left Center Right ) ) { my $item = $element . $position; print "$element$position: ", $Sheet->PageSetup->$item, "\n"; } }
    ++ to the first person to show me how to eliminate $item - I feel like it is unnecessary.

    --
    I'd like to be able to assign to an luser

      Perfect, thanks much
      ++ to the first person to show me how to eliminate $item - I feel like it is unnecessary.
      $Sheet->PageSetup->${ \"$element$position" };
        You can use the "hash syntax" to access object properties (see Win32::OLE documentation)Properties of an object are implemented as a hashref, so more simply:

        $Sheet->PageSetup->{"$element$position"} # or $Sheet->PageSetup->{$element . $position}
        Update: pr

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://582925]
Approved by BaldPenguin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-12-29 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (192 votes), past polls