Yii 1.1: phpexcel-codeplex

http://www.codeplex.com/PHPExcel
8 followers

This extension is ... http://www.codeplex.com/PHPExcel Download from phpexcel-codeplex

Resources

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • The vendors.zip is too large ,can't download from yii site;
  • Download from phpexcel-codeplex
  • Extract the release file under protected/vendors

Usage

See the following code example:

Yii::import('application.vendors.PHPExcel',true);
            $objReader = new PHPExcel_Reader_Excel5;
            $objPHPExcel = $objReader->load(@$_FILES['xls']['tmp_name']);
            $objWorksheet = $objPHPExcel->getActiveSheet();
            $highestRow = $objWorksheet->getHighestRow(); // e.g. 10
            $highestColumn = $objWorksheet->getHighestColumn(); // e.g 'F'
            $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); // e.g. 5
            echo '<table>' . "\n";
            for ($row = 2; $row <= $highestRow; ++$row) {
              echo '<tr>' . "\n";
              for ($col = 0; $col <= $highestColumnIndex; ++$col) {
                echo '<td>' . $objWorksheet->getCellByColumnAndRow($col, $row)->getValue() . '</td>' . "\n";
              }
              echo '</tr>' . "\n";
            }
            echo '</table>' . "\n";

Change Log

August 28, 2010

  • Initial release.

Total 5 comments

#7697 report it
itmagetan at 2012/04/10 09:00am
Works Perfectly

After downloaded & extracted, this extention works perfectly. This is exactly what i need. Thank you very much.

#2017 report it
shaa at 2010/11/01 06:35pm
I mean php excel from codeplex

:)

#2016 report it
shaa at 2010/11/01 06:33pm
Nice, but phpexcel from disappointed disappointed me

XLS Reader of this lib can't work with custom (currency) formatted cells. :( So I return to using of php-excel-reader. P.S. Maybe I can not right use search in them manual.

#136 report it
sharehua at 2010/08/30 10:10am
Sorry,i had fixed the error

The file is too large,you can download from link。

#137 report it
juban_ at 2010/08/30 05:45am
Nice idea but missing files

This is a great idea but some files are missing from the zip file (the autoloader file for instance). I replaced the files in the PHPExcel folder with the one found on the official site, and it works fine.

Leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: sharehua
  • Category: Others
  • Votes: +7
  • Downloaded: 27 times
  • Created on: Aug 28, 2010
  • Last updated: Aug 30, 2010