Home » File Formats » Spreadsheet_Excel_Writer » Bug #6045
Not work break \n or chr('0x0A') character
Details
| Submitted | 2005-11-23 12:25 UTC |
|---|---|
| From | webmaster at prominfo dot org |
| Status | Bogus |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 4.4.1 |
| OS | Windows 2000 Professional |
| Roadmaps | (Not assigned) |
Comments
[2005-11-23 12:25 UTC] webmaster at prominfo dot org
Description:
------------
Not working properly breaking characters: /n or chr("0x0A") in cell. In Excel I'm use Alt+Enter to input breakline.
Test script:
---------------
<?php
require_once('Spreadsheet/Excel/Writer.php');
$workbook = new Spreadsheet_Excel_Writer();
$worksheet =& $workbook->addWorksheet('test');
$worksheet->write(0, 0, "line_1".chr("0x0A")."line_2"); // first sample
$worksheet->write(1, 0, 'line_1/nline_2'); // second sample
$str = "line1
line2";
$worksheet->write(2, 0, $str); //third sample
$workbook->send('test.xls');
$workbook->close();
?>
[2006-04-28 21:02 UTC] grawpc at hotmail dot com
Tried '\n' ?
[2006-05-18 16:58 UTC] who8mycookies at yahoo dot com
Here's how:
- Add linefeed: '\x0A'
- Add formatting: setTextWrap()