Recommend this page to a friend! |
NAME ====== xlsStream VERSION ======= 0.3 - 20 Jan 2005 DESCRIPTION =========== MS-Excel stream handler SYNOPSIS ======== This class read/writes a data stream directly from/to a Microsoft Excel spreadsheet opened with the xlsfile:// protocol. This is used to export associative array data directly to MS-Excel. REQUIREMENTS ============ PHP4 >= 4.3.2 USAGE ===== Include this file in your script, using include/require: <?php require_once "excel.php"; ?> To export an associative array to an Excel spreadsheet, simply call fopen() using the registered stream wrapper protocol xlsfile://, for example: $fp = fopen("xlsfile://path/to/file.xls", "wb"); This version expects an associative array in the form: $data = array( 0 => array( "column1" => "value1", "column2" => "value2", "column3" => "value3", "column4" => "value4", "column5" => "value5", ), 1 => array( "column1" => "value6", "column2" => "value7", "column3" => "value8", "column4" => "value9", "column5" => "value10", ), ... ); Now write your data array using a single call to fwrite(): fwrite($fp, $data); Then call fclose(), as you would normally. fclose($fp); To download an excel spreadsheet: <?php header ("Content-Type: application/x-msexcel"); header ("Content-Disposition: attachment; filename=\"sample.xls\"" ); readfile("xlsfile://path/to/sample.xls"); exit; ?> FILES ===== excel.php Main class example_export.php Example export script example_download.php Example download script CHANGELOG ========= 0.3 - 20th Jan 2005 Fixed generated .xls unrecognized format issue due to server endian mode (Thanks to Charles Turner for pointing this out) 0.2 - 7th Jan 2005 Fixed bug with arrays and excel files with sizes over the 8192 byte limit 0.1 - 21th Oct 2004 Initial release LICENSE ======= Copyright (C)2004-2005, Ignatius Teo <http://act28.com> All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. COPYRIGHT ========= Copyright (C) 2004-2005 Ignatius Teo <http://act28.com> All Rights Reserved $Id: README,v 1.3 2005/01/20 09:58:58 Owner Exp $ |
Classes of Ignatius Teo | > | MS-Excel Stream Handler | > | ![]() |
> | ![]() |
> | ![]() |
> | ![]() ![]() |
|
Groups | ![]() |
Trackback | Applications | ![]() |
Groups |
![]() |
Listing, accessing and manipulating files and folders | View top rated classes |
![]() |
Access resources like regular files | View top rated classes |
Innovation Award |
![]() October 2004 Winner Prize: One downloadable copy of Roadsend PHP Compiler |
Microsoft Excel is one of the most popular applications for desktop users, especially as a business work tool. Therefore the generation of spreadsheets in the Excel XLS format is a frequently used feature of Web applications to provide information in a way that lets their users do their work using Excel. There have always been plenty of solutions to generate spreadsheet files in the XLS format. However, this class provide an innovating approach to the problem of generating XLS files. This class takes advantage of the stream wrapping capabilities introduced in PHP 4.3 to let applications create XLS files just by using common file handling functions, making the generation of this type of files a trivial task. Manuel Lemos |
User ratings |
Ratings | Utility | Consistency | Documentation | Examples | Tests | Videos | Overall | Rank |
---|---|---|---|---|---|---|---|---|
All time: | Sufficient (77%) | Sufficient (72%) | Sufficient (66%) | Sufficient (69%) | - | - | Not sure (59%) | 1393 |
Month: | Not yet rated by the users |
Pages that reference this package |
Convert csv to xls (excel) in php Luckily for me, Ingatius Teo has done all of the heavy lifting, I just had to add a little code around it... |
Crear archivos Excel desde PHP Bueno, hace ya varios posts, publique algo acerca de como crear archivos PDF’s desde codigo PHP, algo que sin dudo me imagino que a muchos le ha sido de gran utilidad... |
Create Excel files with PHP Have you ever thought of creating excel files from your web site?... |
Create excel files with PHP Have you ever thought of creating excel files from your web site?... |
Creating excel files through PHP No need to use complicated or extensive libraries (such as PEAR) to create Excel pages... |
Generar Excel con PHP La presente es una pequeña guía de como generar archivos en formato Excel utilizando PHP... |
Generating Excel files with PHP Danne Lundqvist has posted about the process he went through when developing a solution to create Excel files in PHP:... |
muss Exceldatei (.xls) in eine CSV-Datei konvertieren PHP-Kenntnisse: Anfänger 123leichtkauf befindet sich auf einem aufstrebenden Ast Standard muss Exceldatei (.xls) in eine CSV-Datei konvertieren Moin moin, ich hab das Problem, dass ich eine .xls in eine .csv konvertieren muss... |
Per PHP Daten an ein externes Gerät weitergeben Wenn es auch XLS sein darf, gibt es hier was feines... |
PHP : Dead Easy Excel Export Some people like their excel files... |
PHP to Excel I was tasked with exporting report to Microsoft Excel files... |
PHP, XML and MS Excel Files Need to check these out:... |
Problemas al Exportar a Excel Hola Bueno yo aun no encuentro solucion al problema como lo que yo exporto son ordenes de servicio pues le agregue al numero la palabra ost ya en el excel el usuario lo extrae y al menos se queda contento por un momentito hay una pagina muy buena quizas te ayude es esta Class: MS-Excel Stream Handler (excel, xls, spreadsheet, wrapper) - PHP Classes hay muchos ejemplitos de diferentes tipos quizas por ahi este la solucion a nuestro problema yo aun no reviso... |
Registro Fashion 2009 | Aplicacion AIR Pues esta ocacion les hablare de una aplicacion que apenas termine... |
Vinu Thomas Blog: Saving Data into Excel the Easy Way using PHP Vinu Thomas has a new post to his blog looking at using the MS-Excel Stream Handler class to push your data out to Excel (in more than just a CSV file)... |
Where is my file? I am creating a small project to manage some books for my team... |
Write Excel Files in PHP - Simple and Easy Way So this time my simple task was to extract some data from some websites and write them into an excel file and submit... |
Writing To Excel With PHP Today I searched how to write out an Excel file with PHP... |
xls per php lesen Ich suche eine Funktion oder eine Klasse, mit der ich ein xls-File per PHP einlesen und Zeile für Zeile parsen kann... |
[Erledigt] Excel-Datei mit PHP lesen unter Linux Siehe Excel Klasse vom... |
Latest pages that reference packages
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
![]() |
File | Role | Description |
---|---|---|
![]() ![]() |
Example | Example download script |
![]() ![]() |
Example | Example export script |
![]() |
Class | Primary class |
![]() ![]() |
Doc. | README file |
![]() ![]() NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|