On the RegDeveloper website, there's a new tutorial posted that covers the creation of both PDF files and Excel reports from inside of PHP (with the help of the Spreadsheet_Excel_Writer PEAR component and the ClibPDF PHP Library (bundled with PHP 5.3).
Given the prevelance of PHP, Excel and PDF it's fortunate there exists class libraries for the generation of PDF documents and Excel spreadsheets using PHP.
They start with the PDF generation and show the installation process for ClibPDF and an example of creating a document on the fly. Their example sets up a title, some content text and a table of information. Creating the Excel spreadsheet is even simpler with the Spreadsheet_Excel_Writer - installation via a PEAR channel and defining the worksheet, fonts and content are quick and easy function calls.