Exporting Data to Files with PHP
Providing a file from a database in exactly the same format that's requested by the user is an extremely valuable technique. In this course, David Powers shows you how to export data from a database with PHP in a variety of formats, including rich text, CSV, Excel, Word, OpenOffice spreadsheets and documents, and even XML. He introduces tools like PHPExcel and PHPRtfLite that make the job of formatting the data (fonts, headers, columns, and all) easier to manage, and also shows how to embed nontext data like images in your exports.
- Connecting to the database with PDO or MySQL Improved
- Outputting data into a simple text or CSV file
- Generating a spreadsheet
- Creating columns and headers
- Using a class to generate XML
- Creating a page template
- [Voiceover] Hi, I'm David Powers. Welcome to Exporting Data with PHP, a practical guide to generating different types of files from a database result. We'll begin with basic formats, plain text and CSV files. Then I'll show you how to generate a professional-looking spreadsheet in Microsoft Excel format with PHP Excel, a powerful open-source library. We'll compare the results with another library that generates OpenDocument spreadsheets.
After taking a look at exporting to rich text format with PHPRtfLite, the final part of the course shows how to generate word process documents in OpenDocument text and Microsoft Word formats. As well as text, you'll embed images in the files. There's a lot to get through, so let's get started exporting data with PHP.
Uploading Files Securely with PHP80,334 Views
Up and Running with the Standard PHP Library51,798 Views
PHP 5.5 First Look32,880 Views
Accessing Databases with Object-Oriented PHP146,153 Views
Up and Running with PHP: PEAR, PECL, and Composer42,306 Views
PHP with MySQL Essential Training4,283,533 Views
Illustrator CC 2013 One-on-One: Fundamentals1,678,359 Views
3ds Max 2015 Essential Training515,189 Views
PHP with MySQL Beyond the Basics2,284,490 Views