MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

Exporting Data to Files with PHP

Course Summary

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.       


  • +

    Course Syllabus

    Introduction
       Welcome
       What you should know before watching this course
       Using the exercise files
    1. Setting Up
       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
    2. Basic File Formats
       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
    3. Generating a Spreadsheet
       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
    4. Exporting as Rich Text Format
       Installing PHPRtfLite
       Defining the page margins and the footer
       Setting heading and paragraph styles
       Adding the data and outputting a .rtf file
    5. Exporting to Word Processor Formats
       Understanding the basic process
       Merging XML documents with XSLT
       Preparing a directory to generate the output
       Generating XML from a database result
    6. Generating an OpenDocument Text File
       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
    7. Generating a Microsoft Word 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
    Conclusion
       Goodbye
     


Course Fee:
USD 25

Course Type:

Self-Study

Course Status:

Active

Workload:

4 - 5 hours / week

Attended this course?

Back to Top

Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top