Home » File Formats » Spreadsheet_Excel_Writer » Bug #4560
Spreadsheet_Excel_Writer mergeCells setBorder issue
Details
| Submitted | 2005-06-09 05:26 UTC |
|---|---|
| From | bxny78 at yahoo dot com |
| Assigned | xnoguer |
| Status | Closed |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 4.3.2 |
| OS | RH9 |
| Roadmaps | (Not assigned) |
Comments
[2005-06-09 05:26 UTC] bxny78 at yahoo dot com
Description:
------------
When using Spreadsheet_Excel_Writer, if you try to utilize the mergeCells(...) and setBorder(...), the results are not as expected. Instead of seeing a border around the merged cells, you see a partial border on the first cell only.
Reproduce code:
---------------
$xls =& new Spreadsheet_Excel_Writer();
$wsheet =& $xls->addWorksheet('workSheet');
$borderR =& $xls->addFormat();
$borderR->setFontFamily('Arial');
$borderR->setSize('10');
$borderR->setAlign('right');
$borderR->setColor('black');
$borderR->setTextWrap();
$borderR->setBorder (1);
$wsheet->write(1,1,"this is a test!",$borderR);
$wsheet->mergeCells (1, 1, 3, 6);
Expected result:
----------------
border around the cells Start Pos: 1,1 thru End Pos: 3,6
[2005-11-12 23:48 UTC] xnoguer at php dot net
this should work:
require_once 'Spreadsheet/Excel/Writer.php';
$xls =& new Spreadsheet_Excel_Writer('bla.xls');
$xls->setVersion(8);
$wsheet =& $xls->addWorksheet('workSheet');
$borderR =& $xls->addFormat();
$borderR->setFontFamily('Arial');
$borderR->setSize('10');
$borderR->setAlign('right');
$borderR->setColor('black');
$borderR->setTextWrap();
$borderR->setBorder (1);
$wsheet->write(1,1,"this is a test!",$borderR);
$wsheet->mergeCells (1, 1, 3, 6);
$xls->close();
[2006-06-09 08:03 UTC] rithish dot saralaya at tallysolutions dot com
Hello.
Will this work for Excel 2003+?
Regards,
Rithish
[2006-11-17 14:57 UTC] francescoc82 at gmail dot com
$xls->setVersion(8);
doesn't work!