in reply to Print a full path in center footer

We're going to need quite a lot more information in order to give any sensible help. What are you trying to do? What modules are you using? Can we see a small sample of code that we can run ourselves?

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

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

Replies are listed 'Best First'.
Re^2: Add a full path (Excel)
by tye (Sage) on Aug 13, 2004 at 15:57 UTC

    Based on "$sheet", I'm guessing OLE to Excel and also that the answer is really about Excel and that OLE and Perl don't change it at all.

    But I see no documentation for &F nor &[File] in my Excel's help so I think the only hope is some advanced non-standard Excel documentation, perhaps google could find that. (Or one might get lucky just experimenting.)

    - tye        

Re^2: Add a full path
by jinhuang1992 (Novice) on Aug 13, 2004 at 16:05 UTC
    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.

      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