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.
Setting properties and defaults in PHPExcel - PHP Tutorial
From the course: PHP: Exporting Data to Files
Setting properties and defaults in PHPExcel
We're going to use PHPExcel to export the used cars data to an Excel spreadsheet. But before diving into the code, let's take a look at the finished file. It's cars.xlsx, which you can find in the exercise files for this video. I'm opening it in Microsoft Excel, but you can also open this file in OpenOffice Calc. The data is nicely formatted with the headings in bold type and the data vertically aligned in each cell. Most of the columns are centered but the make column and description are left aligned. The data in the mileage column has been formatted with thousand separators. And the price column has been formatted as dollars. The font has been set to Lucida Sans Unicode. Let's take a look at the print preview. The page is in landscape orientation, with a header and a footer. In fact, the content has been scaled to fit the width of the page. This looks a lot more professional than the CSV output that we saw in Chapter Two. But, it does involve writing considerably more code. In your…
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)
Introducing PHPExcel3m 31s
-
(Locked)
Setting properties and defaults in PHPExcel6m 58s
-
(Locked)
Setting the spreadsheet's print options5m 59s
-
(Locked)
Populating an Excel spreadsheet with data7m 46s
-
(Locked)
Formatting columns in PHPExcel5m 47s
-
(Locked)
Downloading the data as a .xlsx file5m 18s
-
(Locked)
Creating a spreadsheet in the OpenDocument format3m 4s
-
(Locked)
Creating columns and headers in Fusonic SpreadsheetExport6m 26s
-
(Locked)
Adding the data and downloading as a .ods file6m 52s
-
(Locked)
-
-
-
-
-