How to output more than 255 characters in an Excel cell using Spreadsheet_Excel_Writer () in php?

I am trying to output a few paragraphs of text into an Excel spreadsheet, but right now the text is truncated to display only 255 characters. The code is pretty simple:

$xls =& new Spreadsheet_Excel_Writer();
$sheet =& $xls->addWorksheet($name);

foreach ($rec as $field) {
    $rec = ($rec['data'] ? $rec['data'] : $rec);
    $sheet->write($row, $col++, $field);
}

Is there anything I can do to get all the text, not just 255 characters?

+3
source share
1 answer

From the note in the documentation :

$workbook->setVersion(8); // Use Excel97/2000 Format
$worksheet->writeString(0, 0, $str);
+6
source

Source: https://habr.com/ru/post/1708122/


All Articles