in reply to Re: Add a full path
in thread Print a full path in center footer

my $excel = Win32::OLE->new('Excel.Application'); my $book = $excel->Workbooks->Open("c:\\temp\\sale.xls"); my $sheet = $book->Worksheets(1); with ($sheet->PageSetup, CenterFooter => "&F") &F is a code that prints a file name sale.xls. What is the code to print a full path c:\temp\sale.xls? Thanks.

Replies are listed 'Best First'.
Re^3: Add a full path
by davorg (Chancellor) on Aug 13, 2004 at 16:18 UTC

    Please use <code> tags to make your code easier to look at. And you only need to post your code once!

    I'm not sure how you expected us to work that out from your original description of the problem. But now I know what you are trying to do, I can see that it has nothing to do with Perl.

    So here's what I did. I googled for "Excel &F" to see if I could find a list of these codes. The second link was called "Pathname in headings, footers, and cells" and reading that page seems to indicate that &Z is the answer to your question.

    As a non-Excel user, it took me 30 seconds to find the answer once I knew the question. Surely you can see that Google would have been a better route than PerlMonks?

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg