Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Excel to PDF question (for John McNamara & Corion, especially)

by cypress (Beadle)
on Dec 09, 2009 at 16:39 UTC ( [id://811964]=perlquestion: print w/replies, xml ) Need Help??

cypress has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

On Mac OS X with ActivePerl 5.10, I need to save/convert Excel files as/to PDF files. I thought I'd come up with a roundabout solution -- write & save the Excel files as XML using Spreadsheet::WriteExcelXML and then convert them to PDFs with PDF::Template -- only to discover this morning that PDF::Template won't install on this Mac and that, according to Corion in post 771578, I'd lose my fancy formatting anyhow.

Any other solutions out there for me? Remember: I'm on a Mac, where I don't believe OLE is of any use (though Spreadsheet::ParseExcel, with its "OLE::Storage_Lite" dependency, installed and runs -- so maybe I'm a little confused).

Thanks. --cypress

PS: My spreadsheets include image files.

  • Comment on Excel to PDF question (for John McNamara & Corion, especially)

Replies are listed 'Best First'.
Re: Excel to PDF question (for John McNamara & Corion, especially)
by NiJo (Friar) on Dec 09, 2009 at 18:32 UTC
    I'd use a PDF printer, as it should be readily availabe for the CUPS based printing system. In most cases the name of tthe PDF file is somehow based on the XLS file. Your perl script just needs to do the printing, but in simple cases even that is not required. Just mark the XLS files and "print" to the PDF printer.

    P.S: I'm not a Mac user

Re: Excel to PDF question (for John McNamara & Corion, especially)
by jmcnamara (Monsignor) on Dec 10, 2009 at 10:25 UTC

    I'm almost certain that you can't do what you want to do with the Spreadsheet::* modules.

    If you have Excel installed you could probably do this easily enough using Mac Automator like in this example.

    --
    John.

Re: Excel to PDF question (for John McNamara & Corion, especially)
by MidLifeXis (Monsignor) on Dec 10, 2009 at 16:27 UTC

    Can you drive OpenOffice? I am usually happy with the Excel and PDF support offered by OpenOffice.

    Update: You should also be able to use the print-to-PDF option built into the Mac printing system, assuming, of course, that you can somehow open the XLS file. I am a Mac user, and do this often when building meeting packets.

    --MidLifeXis

      I'll second this. The built-in print-to-PDF functionality of OS X is one of the hidden gems of the operating system. I've caught myself trying to use it on Windows and Linux systems more than a few times.

      --
      tbone1, YAPS (Yet Another Perl Schlub)
      And remember, if he succeeds, so what.
      - Chick McGee

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://811964]
Approved by marto
Front-paged by MidLifeXis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found