WebAppers

/ best free open source web resources /

Shopify

PHP Excel Reader – Parse & Retrieve Content from XLS Files

Posted · Category: MIT License, Tools

PHP Excel Reader allows you to parse and retrieve information from XLS files. It reads the binary format of XLS files directly and can return values and formats from any cell.

The simplest way to interact with an XLS file is to just dump it to HTML for display in a browser. This method will generate a table with inline CSS and all available formatting. By simply using this php command: <?php dump(true,true); ?> The output looks like this (with some CSS):

php-excel-reader

Requirements: PHP Framework
Demo: http://code.google.com/p/php-excel-reader/
License: MIT License

13 Comments
  • http://www.easywebshop.no/ Kim Steinhaug

    This is a great library for PHP, and should solve most peoples problems when handling Excel files. Anyone know of any good (not XML) Excel writers for PHP4/5?

  • http://www.mirandarp.org Razunter
  • http://www.easywebshop.no/ Kim Steinhaug

    As excel writer I am currently using this one:
    http://pear.php.net/package/Spreadsheet_Excel_Writer

    What are you using?

  • Andreas Herz

    Hi,

    I’m using http:///www.dbTube.org to import an Excel Sheet

    Greetings

    Andreas

  • http://daipratt.co.uk David Pratt

    You can create a MS Excel file in the following way with the MS-Excel Stream handler:

    $fp = fopen(“xlsfile://temp/excel.xls”, “wb”);
    if (!is_resource($fp)) {
    die(“Cannot open file”);
    }

    $data= array(
    array(“Team” => “Chelsea”, “Points” => 80,
    array(“Team” => “Arsenal”, “Points” => 85,
    array(“Team” => “Spurs”, “Points” => 75
    );
    fwrite($fp, serialize($data));
    fclose($fp);

    //Simples

  • http://www.phpexcel.net Mark Baker

    Or take a look at PHPExcel ( http://www.phpexcel.net ) which has the benefit of being able to read and write workbooks in a variety of different formats, including both xls and xlsx, and is still actively supported

  • http://www.warungsulap.com amik

    wow.. thanx guys…

    i’m quite new to PHP and i never knew it could export/import from XLS file. surely will take a close look at this one…

  • Gary

    This is a great library, no doubt. I only have one problem and is that when i have a large excel doc (about 50.000 lines) the process dies. Any help for that?

  • Harrald

    Hi,

    50’000 rows in Excel? I think you mean the max 47’000
    lines limitation of Excel…anymway.

    I solve my problem with dbTube by increase the max PHP
    memory and increase the script max excution time in my php.ini.

    Greetings

    Harrald.

  • http://www.steinhaug.no/ kim@steinhaug.com

    @Andreas Herz
    I see dbtube.org being mentioned many places in the comments, and I have looked at their site a few times without being convinced this is a sollution of my needs.

    Can someone point me to an article or review of this “system”, do I install it in my own system or is it just a service? I need to parse excel files to import data in different systems, having a service for doing this is no good to me. Maby I didnt read the dbtube.org site correctly, but seems to my this is a service and not a system?

  • Andreas Herz

    Hi,

    dbTube.org is a PHP software which can be installed on any
    PHP server. It is not a service – dbTube is not Google ;-)

    In this case you can use it for your private intranet or on
    your local, standalone machine.

    Requirements: Excel xls, PHP >=5 and mySQL

    Greetings

    Andreas

  • Igor Karpov

    For parse more than 50 000 rows files you shoud use NoXLS API parser.

    http://noxls.net/documentation

    Its quick api parser for large files.

    As result you will get sql dump of your xls file.

  • Igor Karpov

    try this api http://noxls.net/documentation
    its works fine

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons