removing 31 characters restriction on sheets names for BIFF8 (bug #1921)

git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@200195 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xavier Noguer Gallego 2005-11-08 03:32:52 +00:00
parent 590e85399c
commit 52e7ab47c6
1 changed files with 6 additions and 3 deletions

View File

@ -322,9 +322,12 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
$name = $sheetname.($index+1);
}
// Check that sheetname is <= 31 chars (Excel limit).
if (strlen($name) > 31) {
return $this->raiseError("Sheetname $name must be <= 31 chars");
// Check that sheetname is <= 31 chars (Excel limit before BIFF8).
if ($this->_BIFF_version != 0x0600)
{
if (strlen($name) > 31) {
return $this->raiseError("Sheetname $name must be <= 31 chars");
}
}
// Check that the worksheet name doesn't already exist: a fatal Excel error.