Book Image

PHP Programming with PEAR

By : Carsten Lucke, Stoyan Stefanov
Book Image

PHP Programming with PEAR

By: Carsten Lucke, Stoyan Stefanov

Overview of this book

<p>PEAR is the PHP Extension and Application Repository, and is a framework and distribution system for reusable, high-quality PHP components, available in the form of "packages". <br /><br />In this book, you will learn how to use a number of the most powerful PEAR packages available to boost your PHP development productivity. By focusing on these packages for key development activities, this book is an in-depth guide to getting the most from these powerful coding resources.<br /><br />You will become a master of various PEAR packages that help you with the essential tasks of PHP development such as:<br /><br />•&nbsp;&nbsp;&nbsp; Accessing databases with MDB2<br />•&nbsp;&nbsp;&nbsp; Displaying data in a range of formats (HTML, Excel spreadsheet, PDF)<br />•&nbsp;&nbsp;&nbsp; Creating and parsing XML documents<br />•&nbsp;&nbsp;&nbsp; Serializing PHP objects into XML, and unserializing XML documents to PHP objects<br />•&nbsp;&nbsp;&nbsp; Consuming and offering web services<br />•&nbsp;&nbsp;&nbsp; Accessing Web APIs including Google, Yahoo, Amazon, and Technorati</p>
Table of Contents (10 chapters)

Excel Spreadsheets


Generating Excel spreadsheets is a task that most programmers are regularly called on to do. Whether we like it or not, the fact is that an Excel spreadsheet has become the standard for presenting and sharing tabular data. The easy-to-use format coupled with the general availability of Excel-compatible programs makes it the format of choice for many companies when they need to create reports for their management or exchange data with other offices.

While there are several different techniques for generating Excel-compatible files, which are mentioned briefly at the end of this section, the PEAR class Spreadsheet_Excel_Writer stands out as the only pure PHP method of creating native Excel spreadsheets.

Excel_Spreadsheet_Writer was ported into PHP from the Perl module Spreadsheet::WriteExcel, and supports not only data input, but adding formatting, formulas, multiple worksheets, images, and much more. Excel_Spreadsheet_Writer does not utilize any external components...