Font size

Topics: Developer Forum, Project Management Forum, User Forum
Nov 9, 2007 at 2:44 PM
hi!

isnt it possible to change the size of the font? im using excel writer 5 of phpExcel 1.4.5

i tried changing the value in the constructor in Font.php but the font size remained the same...
Nov 10, 2007 at 9:06 PM
Try this:
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Text');
$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setSize(20);

You will find more examples in the file 05featuredemo.inc.php located in the Tests directory.
Nov 14, 2007 at 12:00 PM

husker475 wrote:
Try this:
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Text');
$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setSize(20);

You will find more examples in the file 05featuredemo.inc.php located in the Tests directory.


thx husker, that worked for me... strange that the way i was trying didnt work... oh well, that's ok! thanks a lot! ;)