Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate:
Convert CSV to Excel in PHP
Jul 12, 2018 @ 14:50:24

Sameer Borate has a new post to his site sharing a method for converting a CSV to an Excel document using PHP. While you can open a CSV file with Excel correctly, using this method (and library) allows for more control over the end result.

During a recent data conversion project I needed to convert around 250 CSV files to Excel (xls) format. As this was a PHP project I decided to write a small PHP script using the PhpSpreadsheet library.

He then walks through the installation (via Composer) and use of the library to take in a simple CSV of countries and write it out as a .xls file in a single worksheet. He also includes a modification of the script that can be run from the command line, taking in arguments for the source file and the destination.

tagged: convert cvs excel document worksheet tutorial phpspreadsheet package

Link: https://www.codediesel.com/php/convert-csv-to-excel-format-in-php/

Maarten Balliauw's Blog:
Office 2007 SpreadsheetML classes in PHP
Dec 15, 2006 @ 13:16:57

On the Zend Developer Zone today, there's a new post from Maarten Balliauw about a set of PHP classes he's created to work with Office 2007 SpreadsheetML documents (yay! another format!).

I finished my first goals (some basic XLSX writing), and I want to share this set of classes to the community. [...] Each cell supports the following data formats: string, number, formula, boolean. Visual formatting is not implemented, but I'll get to that later.

Features supported currently include the creation of the Spreadsheet object, adding worksheets, adding cells, and exporting the object to the Excel 2007 OpenXML format.

You can check out the project and the latest version over on his blog.

tagged: office spreadsheetxml class xlsx worksheet cell openxml office spreadsheetxml class xlsx worksheet cell openxml

Link:

Maarten Balliauw's Blog:
Office 2007 SpreadsheetML classes in PHP
Dec 15, 2006 @ 13:16:57

On the Zend Developer Zone today, there's a new post from Maarten Balliauw about a set of PHP classes he's created to work with Office 2007 SpreadsheetML documents (yay! another format!).

I finished my first goals (some basic XLSX writing), and I want to share this set of classes to the community. [...] Each cell supports the following data formats: string, number, formula, boolean. Visual formatting is not implemented, but I'll get to that later.

Features supported currently include the creation of the Spreadsheet object, adding worksheets, adding cells, and exporting the object to the Excel 2007 OpenXML format.

You can check out the project and the latest version over on his blog.

tagged: office spreadsheetxml class xlsx worksheet cell openxml office spreadsheetxml class xlsx worksheet cell openxml

Link:


Trending Topics: