|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Why cell size limit in Excel Writer?
Currently, the PEAR package Excel_Spreadsheet_Writer truncates any string that is over 255 characters. The code that does this and checks for this is in Worksheet.php in the function writeString.
Code:
if ($strlen > $this->_xls_strmax) { // LABEL must be < 255 chars
$str = substr($str, 0, $this->_xls_strmax);
$length = 0x0008 + $this->_xls_strmax;
$strlen = $this->_xls_strmax;
$str_error = -3;
}
I would like to write more than 255 characters, but before I delve into the code, I wanted to know if there a reason why they wrote this to have such a limit? |
|
#2
|
|||
|
|||
|
The reason is Excel. The older format supported only 255 characters. But you can use $xls->setVersion(8); to disable this limit and to enable the newer format. The manual will tell you more about this.
|
|
#3
|
|||
|
|||
|
Quote:
It worked like a charm. Thanks! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > Why cell size limit in Excel Writer? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|