HomePHP PHP Excel Implementation in XAMPP Localhost
PHP Excel Implementation in XAMPP Localhost
If you are planning to use PHP to create and interact with a Microsoft Excel spreadsheet application, then you can use the PHP Excel class. It can be a little tricky to use, however, especially for beginners. This tutorial will walk you through the basics and show you how to customize it for your own Excel implementation.
The class is complex, and sometimes getting started on the basics is hard, because PHPExcel is a complete class that interacts not only with MS Excel but with other formats such as PDF, CSV and the OpenDocument Spreadsheet.
The documentation included by the developers is broad, and does not cover the essential beginner steps of the implementation, nor the limitations. In this tutorial, emphasis is given to older versions of Excel because about half of those using Excel use MS Excel 2002/2003 (the older Excel version); this might be a little complex for a beginner, since the phpexcel class will create spreadsheets by default using the MS Excel 2007 version.
Lots of incompatibility issues and basic implementation problems are also discussed thoroughly in this tutorial, including the PHP- elated requirements and customizing the PHP script to output different Excel versions.
I assume you are developing web applications with MS Excel and PHP in the local host environment; this tutorial uses XAMPP local host servers in a Windows environment. If you are not familiar with XAMPP in a Windows environment, it is suggested that you read this tutorial. The completed application can then be deployed on the actual production web server (such as the one at your web hosting company, provided it meets the essential requirements).
The following are the objectives of this tutorial:
Learn how to install the PHPExcel class correctly in your Windows XAMPP local host environment.
If your target version is the latest version (MS Excel 2007), you will learn how to immediately create files and view them using Excel 2007.
If your target version is MS Excel 2002/2003, you will learn how to adjust the default PHP Excel parameters so that you can view the created files.