 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
NetTuts.com: How to Generate a Complete Excel Spreadsheet From MySQL
by Chris Cornutt 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.
voice your opinion now!
excel spreadsheet tutorial phpexcel mysql database
Henry Hayes' Blog: Firebug Console.Log for PHP using Zend Framework
by Chris Cornutt June 15, 2011 @ 12:49:27
Henry Hayes has written up a handy post to his blog looking at using FirePHP and Zend_Log_Writer_Firebug to log messages directly to your Firefox's Firebug console.
Due to sloppy programming in the past many PHP error logs can become very clogged up and, unless you use some fancy grep technique, unusable. [...] A project has been around for some time now called FirePHP. This enables us to log messages of various levels of severity to the Firebug console! - Awesome. Just imagine if you are developing an ajax app, you could have all your debug messaging in one place.
He walks you through the steps needed to get the logging up and running - setting up FireBug (if you don't have it already) and FirePHP, editing your Zend Framework bootstrap file to add an _initLogging() method and using it for logging, both in the backend script and on the frontend in the console. He also includes a quick update to the logging method that only logs to the Firebug console if the environment is not production.
voice your opinion now!
firebug consolelog firephp zendframework logging writer
Brian Swan's Blog: Rendering SQL Server Reports as Excel Documents with PHP
by Chris Cornutt September 27, 2010 @ 10:15:51
Brian Swan has a new post to his blog that looks at a method for pulling back the reports from a SQL Server instance in something a bit more readable/useful - an Excel document.
One of the most common questions [from his previous post] has been "How do I render a report as an Excel document?" I've been telling folks that this is easy with the SSRS SDK for PHP (and it is easy), but when I sat down to do it, I ran into a problem. So, in this post, I'll show you how to render a SSRS report as an Excel document and how to avoid the one problem that caused me headaches.
This post's a short one with a code snippet (and download) showing how to connect to the server and create a "RenderAsEXCEL" object and request the report information with that in the rendering function. Then it's just as simple as pushing that information out to a file as a ".xls". The included download will also let you pull down the report as HTML or as a PDF.
voice your opinion now!
sqlserver report excel format pdf html
Ilia Alshanetsky's Blog: PHP Excel Extension
by Chris Cornutt 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.
voice your opinion now!
excel extension libxl phpexcel github
ThinkPHP.de: Import and export data using PHPExcel
by Chris Cornutt 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.
voice your opinion now!
import phpexcel export tutorial excel microsoft
Pablo Viquez's Blog: Export Excel Spreadsheets using Zend Framework
by Chris Cornutt August 25, 2009 @ 07:57:30
New on his blog today Pablo Viquez has this post looking at code that will let your Zend Framework applications export to Microsoft Excel spreadsheets (via the Spreadsheet Excel Writer PEAR component).
Last week, I had to allow the user to export a given report into an MS Excel file format. The application uses Zend Framework 1.9.1 and so far ZF does not support for "Office" formats, so after searching for a nice implementation, I found a PEAR module called Spreadsheet Excel Writter, which looked pretty good, it had very good documentation and the code was clean and well structured so I wanted I give it a shot.
He lays out the structure of the sample application and, using a context switch on the request, he creates a controller that responds to the "/report" by calling a special model/view combination that uses the PEAR package to push out the custom "report.xls" file.
voice your opinion now!
zendframework pear excel spreadsheet
phpRiot: Zend Framework 101 Zend_Log
by Chris Cornutt April 13, 2009 @ 08:46:13
Next up in the phpRiot "Zend Framework 101" series is this new look at the logging component of the Zend Framework - Zend_Log.
This article shows you how to use Zend_Log, the logging component of the Zend Framework. It allows you to record messages from your application however you please. In this article I will show you how to record messages to a log file. Additionally, if you use the Firebug and FirePHP plug-ins for Firefox, Zend_Log can be extremely useful for application development and debugging. I will also show you how to achieve this.
They walk you through the creation of a simple logger and putting it to use by recording just the events you want (via error levels). There's also an extra section on integrating it with the Firebug/FirePHP extensions for Firefox and push your messages directly to the browser.
voice your opinion now!
zendframework zendlog tutorial introduction logger firebug firephp writer
Maarten Balliauw's Blog: Saving a PHPExcel spreadsheet to Google Documents
by Chris Cornutt 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.
voice your opinion now!
tutorial save phpexcel extensible document google spreadsheet zendframework zendgdata
|
Community Events
Don't see your event here? Let us know!
|