- 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,173 +1,255 @@
<?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
<name>Spreadsheet_Excel_Writer</name> http://pear.php.net/dtd/package-2.0
<summary>Package for generating Excel spreadsheets</summary> http://pear.php.net/dtd/package-2.0.xsd">
<description> Spreadsheet_Excel_Writer was born as a porting of the Spreadsheet::WriteExcel Perl module to PHP. <name>Spreadsheet_Excel_Writer</name>
It allows writing of Excel spreadsheets without the need for COM objects. <channel>pear.php.net</channel>
It supports formulas, images (BMP) and all kinds of formatting for text and cells. <summary>Package for generating Excel spreadsheets</summary>
It currently supports the BIFF5 format (Excel 5.0), so functionality appeared in the latest Excel versions is not yet available. <description>
</description> Spreadsheet_Excel_Writer was born as a porting of the Spreadsheet::WriteExcel Perl module to PHP.
<license>LGPL</license> It allows writing of Excel spreadsheets without the need for COM objects.
<maintainers> It supports formulas, images (BMP) and all kinds of formatting for text and cells.
<maintainer> It currently supports the BIFF5 format (Excel 5.0), so functionality appeared in the latest Excel versions is not yet available.
<user>xnoguer</user> </description>
<name>Xavier Noguer</name> <lead>
<email>xnoguer@php.net</email> <name>Xavier Noguer</name>
<role>lead</role> <user>xnoguer</user>
</maintainer> <email>xnoguer@php.net</email>
<maintainer> <active>yes</active>
<user>tuupola</user> </lead>
<name>Mika Tuupola</name> <developer>
<email>tuupola@appelsiini.net</email> <name>Mika Tuupola</name>
<role>developer</role> <user>tuupola</user>
</maintainer> <email>tuupola@appelsiini.net</email>
</maintainers> <active>yes</active>
</developer>
<date>2007-03-27</date>
<time>16:59:28</time>
<version>
<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>
- Fixed Bug #10399: Fatal error when closing workbook with no worksheets.
</notes>
<contents>
<dir name="/">
<dir name="Spreadsheet">
<dir name="Excel">
<dir name="Writer">
<file name="BIFFwriter.php" role="php" />
<file name="Format.php" role="php" />
<file name="Parser.php" role="php" />
<file name="Validator.php" role="php" />
<file name="Workbook.php" role="php" />
<file name="Worksheet.php" role="php" />
</dir>
<file name="Writer.php" role="php" />
</dir>
</dir>
</dir>
</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>
<release> <release>
<version>x.x.x</version> <version>
<date>200x-xx-xx</date> <release>0.2</release>
<notes> <api>0.2</api>
</notes> </version>
<deps> <stability>
<dep type="pkg" rel="ge" version="0.5">OLE</dep> <release>beta</release>
<dep type="php" rel="ge" version="4.1.0"/> <api>beta</api>
</deps> </stability>
<state>beta</state> <date>2003-03-17</date>
<filelist> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
<dir name="/" baseinstalldir="Spreadsheet/Excel/"> <notes>-added several formatting methods: setTextRotation(), setStrikeOut(),
<file role="php">Writer.php</file> setOutLine(), setShadow(), setScript().
<dir name="Writer"> -fixed bug in Workbook::sheets() (Bjoern Schotte).
<file role="php">BIFFwriter.php</file> -fixed range for references in formulas (Edward).
<file role="php">Workbook.php</file> -added support for external references in formulas.
<file role="php">Format.php</file> -added support for comparisons in formulas.
<file role="php">Worksheet.php</file> -added support for strings in formulas.
<file role="php">Parser.php</file>
<file role="php">Validator.php</file> </notes>
</dir>
</dir>
</filelist>
</release> </release>
<changelog> <release>
<release> <version>
<version>0.2</version> <release>0.3</release>
<state>beta</state> <api>0.3</api>
<date>2003-03-17</date> </version>
<notes> <stability>
-added several formatting methods: setTextRotation(), setStrikeOut(), <release>stable</release>
setOutLine(), setShadow(), setScript(). <api>stable</api>
-fixed bug in Workbook::sheets() (Bjoern Schotte). </stability>
-fixed range for references in formulas (Edward). <date>2003-05-02</date>
-added support for external references in formulas. <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
-added support for comparisons in formulas. <notes>New features:
-added support for strings in formulas. -added support for row ranges (JT Hughes)
</notes> -added method method Format::setUnLocked() (Ajit Dixit)
</release> -added Worksheet::writeRow() and Worksheet::writeCol()
<release> Bug fixes:
<version>0.3</version> -fixed problem with unparenthesized expresions in formulas (Brent Laminack)
<date>2003-05-02</date> -fixed problems with non ISO-8859-1 characters (KUBO Atsuhiro)
<notes> -fixed swapping of columns in formulas (JT Hughes)
New features: -fixed assorted bugs in tokenizing formulas (JT Hughes)
-added support for row ranges (JT Hughes) -fixed Worksheet::activate() (JT Hughes)
-added method method Format::setUnLocked() (Ajit Dixit)
-added Worksheet::writeRow() and Worksheet::writeCol() </notes>
Bug fixes: </release>
-fixed problem with unparenthesized expresions in formulas (Brent Laminack) <release>
-fixed problems with non ISO-8859-1 characters (KUBO Atsuhiro) <version>
-fixed swapping of columns in formulas (JT Hughes) <release>0.4</release>
-fixed assorted bugs in tokenizing formulas (JT Hughes) <api>0.4</api>
-fixed Worksheet::activate() (JT Hughes) </version>
</notes> <stability>
</release> <release>stable</release>
<release> <api>stable</api>
<version>0.4</version> </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>
<date>2003-10-01</date> <release>0.5</release>
<notes> <api>0.5</api>
New features: </version>
-added rowcolToCell() utility method for easy writing of formula's cell references (JT Hughes). <stability>
-added Worksheet::setOutline() method (Herman Kuiper) <release>stable</release>
-added Format::setFontFamily() method (Donnie Miller) <api>stable</api>
Bug fixes: </stability>
-fixed bug #21, cyrillic characters in sheet references (arhip at goldentele dot com) <date>2003-10-01</date>
</notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
</release> <notes>New features:
<release> -added rowcolToCell() utility method for easy writing of formula&apos;s cell references (JT Hughes).
<version>0.6</version> -added Worksheet::setOutline() method (Herman Kuiper)
<date>2003-11-15</date> -added Format::setFontFamily() method (Donnie Miller)
<notes> Bug fixes:
New features: -fixed bug #21, cyrillic characters in sheet references (arhip at goldentele dot com)
- allow semicolon as argument separator (Axel Pratzner) </notes>
- added experimental Excel97 generation. You can test it with setVersion(): </release>
$woorrkbook = new Spreadsheet_Excel_Writer('prueba_A.xls'); <release>
$woorrkbook->setVersion(8); <version>
Beware! this method will be deprecated in a future release (when <release>0.6</release>
Excel97 becomes the default). It is only available for testing <api>0.6</api>
purposes. Use it at your own risk. </version>
- strings longer than 255 bytes are now available using the experimental <stability>
Excel97 generation. But not all Excel97 features are available yet! <release>stable</release>
Bug fixes: <api>stable</api>
- Fixed bug #225, error in writeUrl() (jamesn at tocquigny dot com) </stability>
- Fixed bug #59, retval undefined for writeRow() (Bertrand) <date>2003-11-15</date>
</notes> <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
</release> <notes>New features:
<release> - allow semicolon as argument separator (Axel Pratzner)
<version>0.7</version> - added experimental Excel97 generation. You can test it with setVersion():
<date>2004-02-27</date> Beware! this method will be deprecated in a future release (when
<notes> Excel97 becomes the default). It is only available for testing
New features: purposes. Use it at your own risk.
- allow setting temp dir other than default using setTempDir() (using OLE 5.0 for this). - strings longer than 255 bytes are now available using the experimental
- added setMerge() for merging (only for experimental Excel97 generation) Excel97 generation. But not all Excel97 features are available yet!
- added setCountry() method. Bug fixes:
- added setLocked() method. - Fixed bug #225, error in writeUrl() (jamesn at tocquigny dot com)
Bug fixes: - Fixed bug #59, retval undefined for writeRow() (Bertrand)
- Fixed bug #415, typo in BIFF8 code (papercrane at reversefold dot com) </notes>
</notes> </release>
</release> <release>
<release> <version>
<version>0.8</version> <release>0.7</release>
<date>2004-06-22</date> <api>0.7</api>
<notes> </version>
New features: <stability>
- added hideScreenGridlines() (Paul Osman) <release>stable</release>
Bug fixes: <api>stable</api>
- Fixed SST table (long strings) (Bernd Jaenichen) </stability>
- Fixed bug #1218, SST table (boucher dot stephane at free dot fr) <date>2004-02-27</date>
- Fixed bug #781, insertBitmap ignores row height <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- Fixed bug #578, setVPageBreaks doesn't handle multiple value arrays (natel at tocquigny dot com) <notes>New features:
</notes> - allow setting temp dir other than default using setTempDir() (using OLE 5.0 for this).
</release> - added setMerge() for merging (only for experimental Excel97 generation)
<release> - added setCountry() method.
<version>0.9.0</version> - added setLocked() method.
<date>2005-11-21</date> Bug fixes:
<notes> - Fixed bug #415, typo in BIFF8 code (papercrane at reversefold dot com)
New features: </notes>
- adding new methods Format::setVAlign() and Format::setHAlign() </release>
- adding support for uncapitalized functions in formulas (ej: "=sum(B27:B31)") <release>
- adding support for different charsets with method Worksheet::setInputEncoding() <version>
- adding support for sheetnames longer than 31 chars when using setVersion(8). <release>0.8</release>
Bug fixes: <api>0.8</api>
- Fixed Bug #1796, wrong regular expression in _writeUrlInternal </version>
- Fixed Bug #2363, wrong export filename with spaces <stability>
- Fixed Bug #2425, Error using writeFormula with Now() and TODAY() <release>stable</release>
- Fixed Bug #2876, German Umlauts destroy sheet references <api>stable</api>
- Fixed Bug #1706, Formulas refer to other Worksheets with "spezial" names don't work </stability>
- Fixed Bug #2748, setMargins(), setHeader() and setFooter() work in excel but not in openoffice. <date>2004-06-22</date>
- Fixed Bug #5698, preg_replace in _writeUrlInternal <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- Fixed Bug #2823, Inpropper results from writeUrl() method <notes>New features:
</notes> - added hideScreenGridlines() (Paul Osman)
</release> Bug fixes:
</changelog> - Fixed SST table (long strings) (Bernd Jaenichen)
- Fixed bug #1218, SST table (boucher dot stephane at free dot fr)
- Fixed bug #781, insertBitmap ignores row height
- Fixed bug #578, setVPageBreaks doesn&apos;t handle multiple value arrays (natel at tocquigny dot com)
</notes>
</release>
<release>
<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>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
<notes>New features:
- adding new methods Format::setVAlign() and Format::setHAlign()
- 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 sheetnames longer than 31 chars when using setVersion(8).
Bug fixes:
- Fixed Bug #1796, wrong regular expression in _writeUrlInternal
- Fixed Bug #2363, wrong export filename with spaces
- Fixed Bug #2425, Error using writeFormula with Now() and TODAY()
- Fixed Bug #2876, German Umlauts destroy sheet references
- 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 #5698, preg_replace in _writeUrlInternal
- Fixed Bug #2823, Inpropper results from writeUrl() method
</notes>
</release>
</changelog>
</package> </package>