Setting column width: class or converter problem?

Topics: Developer Forum, User Forum
Mar 19, 2008 at 8:56 PM
Trying to set column width (using Writer 2007) I experience one problem. When I open the file in Excel, the actual width is 0.71 points less then it should be.

For example, when I set width with
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);

I get 14.29. To set the width to 1 I have to use this code:
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(1.71);

Unfortunatelly, I don't have Excel2007 installed. I'm using file format converter provided by Microsoft to open .xlsx files with Excel2000. Can anyone tell me, does setting column width work properly when you open the file with Excel2007?
Coordinator
Mar 21, 2008 at 8:02 AM
I noticed you posted an issue on http://www.codeplex.com/PHPExcel/WorkItem/View.aspx?WorkItemId=5808

I'm not sure this should be a structural fix as Calibri is "Excel 2007" default (more familiar for new PHPExcel developers). This will probably end up in the manual or the FAQ.
Mar 21, 2008 at 9:25 AM
Edited Mar 21, 2008 at 9:26 AM
Yes, I guess FAQ entry is enough.