Set Row Height & Width
| From: | Tom Synnott | Date: | Mon, 25 Jun 2007 22:20:07 +0000 |
| Subject: | Set Row Height & Width | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-27569@lists.php.net to get a copy of this message | ||
Hi all,
Am just a noob so would appreciate any help, in the following code how can I set the row height and width? And also can you use Exce_Spreadsheet_Writer to say make the row widths the length they need to be dependant of there data?
$query = "SELECT * FROM
tblmembers WHERE Member='A' ORDER BY LastName";
$result = mysql_query($query);
$num = mysql_num_rows($result);
$i=1;
$bold =& $xls->addFormat();
$bold->setBold(1);
$sheet->write(0,0,"First Name",$bold);
$sheet->write(0,1,"Last Name",$bold);
$sheet->write(0,2,"Date Of Birth",$bold);
$sheet->write(0,3,"Mobile",$bold);
while ($row = mysql_fetch_array($result)) {
$sheet->write($i,0,"{$row['FirstName']}");
$sheet->write($i,1,"{$row['LastName']}");
$sheet->write($i,2,"{$row['DateOfBirth']}");
$sheet->write($i,3,"{$row['MobileNumber']}");
$i++;
}
Thanks in advance!
Tom