PHP | Spreadsheet_Excel_Writer | Introduction
Introduction: Spreadsheet_Excel_Writer is a library written in PHP which helps to read from and write to different types of spreadsheet file formats with the help of given set of classes.
Advantages:
- Easy and effective comparisons.
- Powerful analysis of large amounts of data.
- Spitting out large (or not so large) amounts of information in the form of a spreadsheet, which is easy to manipulate with a fairly ubiquitous spreadsheet program such as Excel (or OpenOffice).
Installation (Composer):
composer require pear/spreadsheet_excel_writer
Usage:
<?php // require_once 'Spreadsheet/Excel/Writer.php'; // Creating a workbook $workbook = new Spreadsheet_Excel_Writer(); // Sending HTTP headers $workbook->send('gfg1.xls'); // Creating a worksheet $worksheet =& $workbook->addWorksheet('1st Worksheet'); // The actual data $worksheet->write(0, 0, 'Website'); $worksheet->write(0, 1, 'Address'); $worksheet->write(1, 0, 'GeeksforGeeks'); // Let's send the file $workbook->close(); ?> |
chevron_right
filter_none
Output:

Reference: https://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.intro.php
Recommended Posts:
- p5.js | Introduction
- PHP | Introduction
- CSS Introduction
- Introduction to ES6
- REST API (Introduction)
- Introduction To AWS Lambda
- Ajax | Introduction
- Introduction to KnockoutJS
- Introduction to Codeignitor (PHP)
- Bootstrap 4 | Introduction
- Introduction to XPath
- Introduction to AngularJS
- Introduction and Installation of Git
- HTML5 | Introduction
- Introduction to Express
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



