- Move files into proper directory structure

- Fixed Bug #10399: Fatal error when closing workbook with no worksheets.
- package.xml v2


git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@232751 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christian Weiske 2007-03-27 15:04:19 +00:00
parent c56e0db7af
commit c7be04a550
9 changed files with 256 additions and 170 deletions

View File

@ -495,6 +495,10 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*/ */
function _storeWorkbook() function _storeWorkbook()
{ {
if (count($this->_worksheets) == 0) {
return true;
}
// Ensure that at least one worksheet has been selected. // Ensure that at least one worksheet has been selected.
if ($this->_activesheet == 0) { if ($this->_activesheet == 0) {
$this->_worksheets[0]->selected = 1; $this->_worksheets[0]->selected = 1;

View File

@ -1,72 +1,113 @@
<?xml version="1.0" encoding="ISO-8859-1" ?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package packagerversion="1.5.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
<package version="1.0"> http://pear.php.net/dtd/tasks-1.0.xsd
http://pear.php.net/dtd/package-2.0
http://pear.php.net/dtd/package-2.0.xsd">
<name>Spreadsheet_Excel_Writer</name> <name>Spreadsheet_Excel_Writer</name>
<channel>pear.php.net</channel>
<summary>Package for generating Excel spreadsheets</summary> <summary>Package for generating Excel spreadsheets</summary>
<description> Spreadsheet_Excel_Writer was born as a porting of the Spreadsheet::WriteExcel Perl module to PHP. <description>
Spreadsheet_Excel_Writer was born as a porting of the Spreadsheet::WriteExcel Perl module to PHP.
It allows writing of Excel spreadsheets without the need for COM objects. It allows writing of Excel spreadsheets without the need for COM objects.
It supports formulas, images (BMP) and all kinds of formatting for text and cells. It supports formulas, images (BMP) and all kinds of formatting for text and cells.
It currently supports the BIFF5 format (Excel 5.0), so functionality appeared in the latest Excel versions is not yet available. It currently supports the BIFF5 format (Excel 5.0), so functionality appeared in the latest Excel versions is not yet available.
</description> </description>
<license>LGPL</license> <lead>
<maintainers>
<maintainer>
<user>xnoguer</user>
<name>Xavier Noguer</name> <name>Xavier Noguer</name>
<user>xnoguer</user>
<email>xnoguer@php.net</email> <email>xnoguer@php.net</email>
<role>lead</role> <active>yes</active>
</maintainer> </lead>
<maintainer> <developer>
<user>tuupola</user>
<name>Mika Tuupola</name> <name>Mika Tuupola</name>
<user>tuupola</user>
<email>tuupola@appelsiini.net</email> <email>tuupola@appelsiini.net</email>
<role>developer</role> <active>yes</active>
</maintainer> </developer>
</maintainers> <date>2007-03-27</date>
<release> <time>16:59:28</time>
<version>x.x.x</version> <version>
<date>200x-xx-xx</date> <release>0.9.1</release>
<api>0.9.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
<notes> <notes>
- Fixed Bug #10399: Fatal error when closing workbook with no worksheets.
</notes> </notes>
<deps>
<dep type="pkg" rel="ge" version="0.5">OLE</dep> <contents>
<dep type="php" rel="ge" version="4.1.0"/> <dir name="/">
</deps> <dir name="Spreadsheet">
<state>beta</state> <dir name="Excel">
<filelist>
<dir name="/" baseinstalldir="Spreadsheet/Excel/">
<file role="php">Writer.php</file>
<dir name="Writer"> <dir name="Writer">
<file role="php">BIFFwriter.php</file> <file name="BIFFwriter.php" role="php" />
<file role="php">Workbook.php</file> <file name="Format.php" role="php" />
<file role="php">Format.php</file> <file name="Parser.php" role="php" />
<file role="php">Worksheet.php</file> <file name="Validator.php" role="php" />
<file role="php">Parser.php</file> <file name="Workbook.php" role="php" />
<file role="php">Validator.php</file> <file name="Worksheet.php" role="php" />
</dir>
<file name="Writer.php" role="php" />
</dir> </dir>
</dir> </dir>
</filelist> </dir>
</release> </contents>
<dependencies>
<required>
<php>
<min>4.1.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
</pearinstaller>
<package>
<name>OLE</name>
<channel>pear.php.net</channel>
<min>0.5</min>
</package>
</required>
</dependencies>
<phprelease />
<changelog> <changelog>
<release> <release>
<version>0.2</version> <version>
<state>beta</state> <release>0.2</release>
<api>0.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-03-17</date> <date>2003-03-17</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
-added several formatting methods: setTextRotation(), setStrikeOut(), <notes>-added several formatting methods: setTextRotation(), setStrikeOut(),
setOutLine(), setShadow(), setScript(). setOutLine(), setShadow(), setScript().
-fixed bug in Workbook::sheets() (Bjoern Schotte). -fixed bug in Workbook::sheets() (Bjoern Schotte).
-fixed range for references in formulas (Edward). -fixed range for references in formulas (Edward).
-added support for external references in formulas. -added support for external references in formulas.
-added support for comparisons in formulas. -added support for comparisons in formulas.
-added support for strings in formulas. -added support for strings in formulas.
</notes> </notes>
</release> </release>
<release> <release>
<version>0.3</version> <version>
<release>0.3</release>
<api>0.3</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-05-02</date> <date>2003-05-02</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
-added support for row ranges (JT Hughes) -added support for row ranges (JT Hughes)
-added method method Format::setUnLocked() (Ajit Dixit) -added method method Format::setUnLocked() (Ajit Dixit)
-added Worksheet::writeRow() and Worksheet::writeCol() -added Worksheet::writeRow() and Worksheet::writeCol()
@ -76,28 +117,43 @@
-fixed swapping of columns in formulas (JT Hughes) -fixed swapping of columns in formulas (JT Hughes)
-fixed assorted bugs in tokenizing formulas (JT Hughes) -fixed assorted bugs in tokenizing formulas (JT Hughes)
-fixed Worksheet::activate() (JT Hughes) -fixed Worksheet::activate() (JT Hughes)
</notes> </notes>
</release> </release>
<release> <release>
<version>0.4</version> <version>
<release>0.4</release>
<api>0.4</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-08-21</date> <date>2003-08-21</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
-using OLE package (>= 0.3) to generate files bigger than 7MB -using OLE package (&gt;= 0.3) to generate files bigger than 7MB
-changed setFgColor() and setBgColor()'s behavior to something more intuitive. -changed setFgColor() and setBgColor()&apos;s behavior to something more intuitive.
Bug fixes: Bug fixes:
-fixed bug #25133, lowercase cell references (jkwiat03 at hotmail dot com) -fixed bug #25133, lowercase cell references (jkwiat03 at hotmail dot com)
-fixed Bug #23730, worksheet names containing spaces in formulas (Robin Ericsson) -fixed Bug #23730, worksheet names containing spaces in formulas (Robin Ericsson)
-fixed Bug #24147, formulas ended in '0' (paul at classical dot com) -fixed Bug #24147, formulas ended in &apos;0&apos; (paul at classical dot com)
-fixed swapping of arguments in variable arguments functions (JT Hughes) -fixed swapping of arguments in variable arguments functions (JT Hughes)
</notes> </notes>
</release> </release>
<release> <release>
<version>0.5</version> <version>
<release>0.5</release>
<api>0.5</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-10-01</date> <date>2003-10-01</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
-added rowcolToCell() utility method for easy writing of formula's cell references (JT Hughes). -added rowcolToCell() utility method for easy writing of formula&apos;s cell references (JT Hughes).
-added Worksheet::setOutline() method (Herman Kuiper) -added Worksheet::setOutline() method (Herman Kuiper)
-added Format::setFontFamily() method (Donnie Miller) -added Format::setFontFamily() method (Donnie Miller)
Bug fixes: Bug fixes:
@ -105,14 +161,19 @@
</notes> </notes>
</release> </release>
<release> <release>
<version>0.6</version> <version>
<release>0.6</release>
<api>0.6</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-11-15</date> <date>2003-11-15</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
- allow semicolon as argument separator (Axel Pratzner) - allow semicolon as argument separator (Axel Pratzner)
- added experimental Excel97 generation. You can test it with setVersion(): - added experimental Excel97 generation. You can test it with setVersion():
$woorrkbook = new Spreadsheet_Excel_Writer('prueba_A.xls');
$woorrkbook->setVersion(8);
Beware! this method will be deprecated in a future release (when Beware! this method will be deprecated in a future release (when
Excel97 becomes the default). It is only available for testing Excel97 becomes the default). It is only available for testing
purposes. Use it at your own risk. purposes. Use it at your own risk.
@ -124,10 +185,17 @@ $woorrkbook->setVersion(8);
</notes> </notes>
</release> </release>
<release> <release>
<version>0.7</version> <version>
<release>0.7</release>
<api>0.7</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-02-27</date> <date>2004-02-27</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
- allow setting temp dir other than default using setTempDir() (using OLE 5.0 for this). - allow setting temp dir other than default using setTempDir() (using OLE 5.0 for this).
- added setMerge() for merging (only for experimental Excel97 generation) - added setMerge() for merging (only for experimental Excel97 generation)
- added setCountry() method. - added setCountry() method.
@ -137,25 +205,39 @@ $woorrkbook->setVersion(8);
</notes> </notes>
</release> </release>
<release> <release>
<version>0.8</version> <version>
<release>0.8</release>
<api>0.8</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-06-22</date> <date>2004-06-22</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
- added hideScreenGridlines() (Paul Osman) - added hideScreenGridlines() (Paul Osman)
Bug fixes: Bug fixes:
- Fixed SST table (long strings) (Bernd Jaenichen) - Fixed SST table (long strings) (Bernd Jaenichen)
- Fixed bug #1218, SST table (boucher dot stephane at free dot fr) - Fixed bug #1218, SST table (boucher dot stephane at free dot fr)
- Fixed bug #781, insertBitmap ignores row height - Fixed bug #781, insertBitmap ignores row height
- Fixed bug #578, setVPageBreaks doesn't handle multiple value arrays (natel at tocquigny dot com) - Fixed bug #578, setVPageBreaks doesn&apos;t handle multiple value arrays (natel at tocquigny dot com)
</notes> </notes>
</release> </release>
<release> <release>
<version>0.9.0</version> <version>
<release>0.9.0</release>
<api>0.9.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2005-11-21</date> <date>2005-11-21</date>
<notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
New features: <notes>New features:
- adding new methods Format::setVAlign() and Format::setHAlign() - adding new methods Format::setVAlign() and Format::setHAlign()
- adding support for uncapitalized functions in formulas (ej: "=sum(B27:B31)") - adding support for uncapitalized functions in formulas (ej: &quot;=sum(B27:B31)&quot;)
- adding support for different charsets with method Worksheet::setInputEncoding() - adding support for different charsets with method Worksheet::setInputEncoding()
- adding support for sheetnames longer than 31 chars when using setVersion(8). - adding support for sheetnames longer than 31 chars when using setVersion(8).
Bug fixes: Bug fixes:
@ -163,7 +245,7 @@ $woorrkbook->setVersion(8);
- Fixed Bug #2363, wrong export filename with spaces - Fixed Bug #2363, wrong export filename with spaces
- Fixed Bug #2425, Error using writeFormula with Now() and TODAY() - Fixed Bug #2425, Error using writeFormula with Now() and TODAY()
- Fixed Bug #2876, German Umlauts destroy sheet references - Fixed Bug #2876, German Umlauts destroy sheet references
- Fixed Bug #1706, Formulas refer to other Worksheets with "spezial" names don't work - Fixed Bug #1706, Formulas refer to other Worksheets with &quot;spezial&quot; names don&apos;t work
- Fixed Bug #2748, setMargins(), setHeader() and setFooter() work in excel but not in openoffice. - Fixed Bug #2748, setMargins(), setHeader() and setFooter() work in excel but not in openoffice.
- Fixed Bug #5698, preg_replace in _writeUrlInternal - Fixed Bug #5698, preg_replace in _writeUrlInternal
- Fixed Bug #2823, Inpropper results from writeUrl() method - Fixed Bug #2823, Inpropper results from writeUrl() method