From the course: PHP: Exporting Data to Files
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating a .docx file to use as a template - PHP Tutorial
From the course: PHP: Exporting Data to Files
Creating a .docx file to use as a template
In the previous chapter, we use this web page to generate and open document text file with the same content, including the images. In this chapter, we'll follow a similar process to generate download file in Microsoft Word format. Just to remind you, this page has a main heading, flower arrangements, and each section follows the same pattern. It has a subheading, image, price, and a series of descriptive paragraphs. We need to create a template in Microsoft Word to replicate this layout. It won't be exactly the same, but it'll be very similar. I'm going to be using Microsoft Word 2013, but you can use any version of Word since Word 2007 for Windows, or Word 2008 for Mac. They all store the content internally in an XML format similar to open document text files. Older versions of Word store the content in a proprietary binary format so you must use Word 2007 or later. So in my blank document I'm going to create a heading one, flower arrangements, then a heading two, this will be a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Creating a .docx file to use as a template3m 37s
-
(Locked)
Extracting the main content file from a Word document5m 28s
-
(Locked)
Formatting the main content file3m 38s
-
(Locked)
Converting the main content file to XSLT6m 18s
-
(Locked)
Outputting the database result as a .docx file6m 4s
-
(Locked)
Offering a choice of download formats3m 55s
-
(Locked)
-