#266 [Opn->Fbk]: setmerge
| From: | xnoguer@php.net | Date: | Tue, 16 Dec 2003 21:33:31 +0000 |
| Subject: | #266 [Opn->Fbk]: setmerge | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-936@lists.php.net to get a copy of this message | ||
ID: 266
Updated by: xnoguer@php.net
Reported By: russ at snowcompanies dot com
-Status: Open
+Status: Feedback
Bug Type: Web Site
Operating System: red hat
PHP Version: 4.3.3
Assigned To: xnoguer
New Comment:
Can you try the latest code from cvs?
I added a new Worksheet::setMerge() method, but it will only work for
BIFF8. You will have to do:
$workbook->setVersion(8); // this is just a temporary method
$worksheet =& $workbook->addWorksheet();
$worksheet->setMerge(0, 0, 0, 1); // merging just 2 cells
It wont be a real fix until BIFF8 becomes the default though.
Previous Comments:
------------------------------------------------------------------------
[2003-12-12 18:21:18] pajoye@php.net
Due to a bug in the bugsystem (doh :) ), assign this one to Xavier, but
still in website category...
pierre
------------------------------------------------------------------------
[2003-11-17 22:45:06] russ at snowcompanies dot com
Description:
------------
I have tried several ways to get cells to merge. My last attempt was
taken the code that is posted in example 23-3. The output is what I
expected except that there are no merged cells.
Reproduce code:
---------------
require_once 'Spreadsheet/Excel/Writer.php';
// We give the path to our file here
//$workbook = new Spreadsheet_Excel_Writer('./test/test.xls');
$workbook = new Spreadsheet_Excel_Writer();
$format_title =& $workbook->addFormat();
$format_title->setMerge();
$worksheet =& $workbook->addWorksheet();
$worksheet->write(0, 0, "", $format_title);
$worksheet->write(0, 1, "", $format_title);
$worksheet->write(0, 2, "", $format_title);
$worksheet->write(1, 0, "Quarter", $format_bold);
$worksheet->write(1, 1, "Profit", $format_bold);
$worksheet->write(2, 0, "Q1");
$worksheet->write(2, 1, 0);
$worksheet->write(3, 0, "Q2");
$worksheet->write(3, 1, 0);
$workbook->send('test.xls');
$workbook->close();
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=266&edit=1