Skip to content

Commit

Permalink
Merge pull request thoroc#5 from cmanley/master
Browse files Browse the repository at this point in the history
Improvements. See changelog.
  • Loading branch information
thoroc committed Dec 7, 2015
2 parents 61e9066 + b21f2cf commit 88fa18f
Show file tree
Hide file tree
Showing 20 changed files with 6,734 additions and 6,563 deletions.
26 changes: 22 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
2015-12-06 (Craig Manley)
- Forked by me (Craig Manley) from https://github.com/thoroc/php_writeexcel which is almost an exact copy of 0.3.0 with
a few warning suppressions, allowance of cell strings longer than 255 chars, and a composer.json file.
- Move examples into subdir.
- Replace space indentation with tabs.
- Add scopes to class properties.
- User code only needs to require the workbook class now. The worksheet is automatically included.
- Workbook constructor now uses an associative array of options, including now optional filename.
- Workbook: add getFileName() method to access the given or temporary filename.
- Workbook: add toString() method to return the workbook binary data as a string.
- Modified to act as a drop-in compatible replacement for PEAR's Spreadsheet_Excel_Writer, as far as I need:
* format: make setting fonts with set_properties() compatible with PEAR's Spreadsheet_Excel_Writer.
* workbook: add alias method setCustomColor().
* workbook: add send() method.
* spreadsheet: add alias methods setMerge(), setColumn(), writeFormula(), writeNumber(), writeString(), writeUrl().
- Worksheet: add getDimensions() method.
- Worksheet: Fix some warnings. Fix bug (mistake porting from Perl) setting $grbit in _store_colinfo().

0.3.0 (2005-11-01):
- Fixed cell merging (fix contributed by Nicolas Kahn - thanks!)
- Corrected the README: formulas are supported since version 0.2.2
Expand All @@ -7,16 +25,16 @@
- Changed all calls of call_user_method_array() to call_user_func_array()
as recent PHP versions complain about call_user_method_array() being
deprecated (reported by Julien Detante and Luc Cessieux)
- Added $_debug to the class variable declaration of
class.writeexcel_biffwriter.inc.php and
- Added $_debug to the class variable declaration of
class.writeexcel_biffwriter.inc.php and
class.writeexcel_worksheet.inc.php so that PHP doesn't complain about it
- The demos now produce proper headers ("Content-Type" and
- The demos now produce proper headers ("Content-Type" and
"Content-Disposition") so that the correct application gets loaded
when an XLS file is received more reliably (thanks to
C. Mourad Jaber)
- Temporary files are now deleted (reported by Siggi Oskarsson)
- Added example-colors.php
- Fixed frozen and thawed panes (reported by Roger Jochem and Flavio
- Fixed frozen and thawed panes (reported by Roger Jochem and Flavio
Ciotola)
- Added example-panes.php to prove that it's really fixed ;-)
- Added example-repeat.php because somebody reported that it doesn't
Expand Down
12 changes: 6 additions & 6 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Where to start
--------------
I've included six example PHP scripts which are also taken out of the
Spreadsheet::WriteExcel package and ported to PHP:
- example-simple.php
- example-merge2.php
- example-stocks.php
- example-textwrap.php
- example-demo.php
- example-bigfile.php
- examples/simple.php
- examples/merge2.php
- examples/stocks.php
- examples/textwrap.php
- examples/demo.php
- examples/bigfile.php
All you have to do is to tar xzvf the package to a directory accessible
via a web server. Then fetch any of the example scripts with your
favourite web browser and Excel should come into place and show you
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
php_writeexcel
==============

Johann Hanne's php lib to write excel file

PHP port of John McNamara's Spreadsheet::WriteExcel by Johann Hanne,
with some tweaks by Thomas Roche (https://github.com/thoroc/php_writeexcel),
and forked by Craig Manley adding more tweaks and some added drop-in compatibility with PEAR's Spreadsheet_Excel_Writer.

Dependencies
============
Expand Down Expand Up @@ -31,3 +32,15 @@ Example for your `composer.json` file:
}
```

Perfomance comparison
=====================
Update by Craig Manley, 2015-12-06:
Writing a table of 8 fields and 950 rows to an Excel file resulted in these average elapsed times:
```
PHPExcel: 7.417
PEAR Spreadsheet_Excel_Writer: 1.078
php_writeexcel: 2.065
```
So clearly, PEAR's Spreadsheet_Excel_Writer is almost twice as fast.
PHPExcel is more modern, but by far the slowest and consumes huge amounts of memory,
which is the only reason I tried with this library, updating it slightly in the process.
Loading

0 comments on commit 88fa18f

Please sign in to comment.