Learn 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.
Overview
Syllabus
Introduction
- Welcome
- What you should know before watching this course
- Using the exercise files
- Loading the test data into a database
- Querying the database with MySQL Improved
- Connecting to different databases with PHP Data Objects (PDO)
- Querying the database with PDO
- Displaying the data in a webpage
- Autoloading classes
- Outputting the database result to a text file
- Outputting the result as a CSV file
- Introducing the Base class for file downloads
- Using the Text class for greater control over output
- Controlling CSV options with the Csv class
- Saving the data to a local file
- Introducing PHPExcel
- Setting properties and defaults in PHPExcel
- Setting the spreadsheet's print options
- Populating an Excel spreadsheet with data
- Formatting columns in PHPExcel
- Downloading the data as a .xlsx file
- Creating a spreadsheet in the OpenDocument format
- Creating columns and headers in Fusonic SpreadsheetExport
- Adding the data and downloading as a .ods file
- Installing PHPRtfLite
- Defining the page margins and the footer
- Setting heading and paragraph styles
- Adding the data and outputting a .rtf file
- Understanding the basic process
- Merging XML documents with XSLT
- Preparing a directory to generate the output
- Generating XML from a database result
- Creating a .odt file to use as a template
- Inspecting the structure of an OpenDocument text file
- Extracting the main content file from a .odt document
- Converting the main content file to XSLT
- Outputting the database result as a .odt file
- Creating a .docx file to use as a template
- Extracting the main content file from a Word document
- Formatting the main content file
- Converting the main content file to XSLT
- Outputting the database result as a .docx file
- Offering a choice of download formats
- Goodbye
Taught by
David Powers