我正在尝试在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个字符?
答案 0 :(得分:6)
来自a note in the documentation:
$workbook->setVersion(8); // Use Excel97/2000 Format
$worksheet->writeString(0, 0, $str);