我试图在Excel电子表格中输出几段文本,但是现在文本被截断以仅显示255个字符.代码非常简单:
$xls =& new Spreadsheet_Excel_Writer();
$sheet =& $xls->addWorksheet($name);
foreach ($rec as $field) {
$rec = ($rec['data'] ? $rec['data'] : $rec);
$sheet->write($row, $coL++, $field);
}
我能做些什么来获取所有文本,而不仅仅是255个字符?
解决方法:
从a note in the documentation开始:
$workbook->setVersion(8); // Use Excel97/2000 Format
$worksheet->writeString(0, 0, $str);