News Feed
Sections




News Archive
feed this:

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

NetTuts.com:
How to Generate a Complete Excel Spreadsheet From MySQL
November 23, 2011 @ 17:52:54

On NetTuts there's a new tutorial showing how to take data from a MySQL database and translate it into a usable Excel file with the help of some simple PHP.

A CSV (Comma Separated Value) file is usually sufficient for exporting MySQL data as an Excel Spreadsheet. These CSV files are data only though. A real Excel spreadsheet has formatting, formulas and perhaps even graphics - the difference between a simple method of data transfer and a professional report. This tutorial shows how to use open source PHP components to create "real" Excel spreadsheets from MySQL SELECT statements.

With the help of the PHPExcel tool, making Excel-formatted files is a simple process. They show how to label columns, pull data out with a "quick and dirty" SQL statement, formatting the results to something a bit more clean and iterate through the pages of data to push them into the spreadsheet (including formulas). You can download the full source to get everything in one shot.

0 comments voice your opinion now!
excel spreadsheet tutorial phpexcel mysql database


Ilia Alshanetsky's Blog:
PHP Excel Extension
August 02, 2010 @ 13:12:02

In a new post to his blog today Ilia Alshanetsky talks about a PHP Excel extension to help with some output generation problems he was seeing (based on the LibXL libraries).

As we are doing more & more Excel output generation, this became a bigger and bigger problem. At first we've tried solving the problem via a newer PHP based Excel library, PHPExcel. Unfortunately, it is massive beast, that is not only slower than the old Spreadsheet Excel Writer/Reader, but memory hog too. [...] So, I turned to Google and found LibXL, which is a small, C++ (with C, C++ interfaces) library that promised really fast Excel reading & writing.

His extension gives you an object-oriented interface to the library that can generate Excel files with a lot less resources than some of the other PHP Excel extensions out there. He includes a sample benchmarking script he used to generate these stats.

0 comments voice your opinion now!
excel extension libxl phpexcel github


ThinkPHP.de:
Import and export data using PHPExcel
July 15, 2010 @ 10:21:12

On the ThinkPHP blog today there's a new post looking at their experience with PHPExcel to open, modify, save, etc Microsoft Excel files directly from PHP.

EAR's Spreadsheet_Excel_Writer combined with the project Spreadsheet_Excel_Reader on SourceForge was a good helper in the past - but only for BIFF5. BIFF8 support in spreadsheet excel writer has been a problem for a long time, and according to the authors, is still somewhat kludgy in the current version. So I needed an alternative. After a short research I stumbled upon PHPExcel which supports reading and writing of many formats in one API.

He lists some of these input and output formats and includes a simple example of how to use the tool. He creates a basic Excel file with a few different attributes (title, body, keywords) and show how to read in a document to extract the document's content.

0 comments voice your opinion now!
import phpexcel export tutorial excel microsoft


Maarten Balliauw's Blog:
Saving a PHPExcel spreadsheet to Google Documents
February 03, 2009 @ 12:58:56

Maarten Balliauw has written up a guide to saving the output of your PHPExcel applications out to the Documents service that Google offers.

As you may know, PHPExcel is built using an extensible model, supporting different input and output formats. The PHPExcel core class library features a spreadsheet engine, which is supported by IReader and IWriter instances used for reading and writing a spreadsheet to/from a file. Currently, PHPExcel supports writers for Excel2007, Excel5 (Excel 97+), CSV, HTML and PDF. Wouldnt it be nice if we could use PHPExcel to store a spreadsheet on Google Documents? Let's combine some technologies.

The two technologies in question are a standard install of the PHPExcel library and the Zend Framework (with its Zend_Gdata component). Using the component, a save() method is created and hooked into the IWriter interface of PHPExcel. When this save method is called, the Zend_Gdata component connects to the Documents service and uploads the resulting information for the account you supply.

0 comments voice your opinion now!
tutorial save phpexcel extensible document google spreadsheet zendframework zendgdata


Maarten Balliauw's Blog:
Reuse Excel business logic with PHPExcel
May 06, 2008 @ 07:51:38

Maarten Balliauw has made a new blog post today about a method he's using to help reuse some of the business logic that Excel spreadsheets can have in a PHP script with help from PHPExcel.

In many companies, business logic resides in Excel. This business logic is sometimes created by business analysts and sometimes by business users who want to automate parts of their everyday job using Excel. [...] Did you know you can use PHPExcel to take advantage of the Excel-based business logic without having to worry about duplicate business logic?

He creates a quick example of a script that can take in an Excal file and pull it into a PHPExcel object, ready for manipulation. He fills in values for the already defined fields (like "carColor" or "leatherSeats") and uses the getCalculatedValue method to perform the action on the cell. The output is dropped into a variable that can be echoed out or used later on in the PHP script.

0 comments voice your opinion now!
phpexcel excel business logic reuse tutorial example


International PHP Magazine:
Poll Question Which is the Best Feature for PHPExcel Version 1.0.0?
March 28, 2007 @ 14:32:11

The International PHP Magazine has posted the results of their latest poll conducted over the past week. They asked developers which of the given options was the best feature of the version 1 release of PHPExcel.

Options for this week's poll included "Creating an in-memory spreadsheet representation", "Adding Worksheets to Spreadsheet", and "Setting Spreadsheet Meta Data", but in the end, it was the "None" option that won out with almost thirty percent of the votes. Tied for second, each with 2.4% of the votes were the options "Creating an in-memory spreadsheet representation", "Setting Spreadsheet Meta Data", and "Adding Worksheets to Spreadsheet".

If you'd like to get in on the action for this week's poll, check out the question and answers for the week - which one of the options is your favorite CMS written in PHP. (Options include Drupal, Joomla, and the Dragonfly CMS).

0 comments voice your opinion now!
phpexcel feature poll favorite cms joomla drupal phpexcel feature poll favorite cms joomla drupal


International PHP Magazine:
Poll Question What are the Features you want to see in PHPUnit Projects
March 21, 2007 @ 09:49:00

The International PHP Magazine has posted their latest results from this past week's poll. They asked readers to vote on which of the options they wanted most to see in PHPUnit projects.

Tying for first place were the two open-ended options, "All" and "None" - both with 17.8% percent of the votes. Falling down to the next slot was the "Web interface for Test Result Database" option, followed by "Support for Distributed Testing".

Be sure to cast your vote in this week's poll too. They ask you, the reader, to vote which of the features listed is the best that the PHPExcel package has to offer (including "Setting Spreadsheet Meta Data" and "Adding Images to your Spreadsheet").

0 comments voice your opinion now!
weeklypoll phpunit project feature phpexcel package weeklypoll phpunit project feature phpexcel package



Community Events





Don't see your event here?
Let us know!


interview configure laravel list series wordpress code testing developer threedevsandamaybe refactor introduction podcast install unittest release community opinion language framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework