PHPExcel column limitation?

Topics: Developer Forum, Project Management Forum, User Forum
Aug 26, 2013 at 2:00 AM
Edited Aug 26, 2013 at 2:09 AM
I am having trouble setting style for columns/range beyond 'AZ', such as BA1, BQ2, etc

this is fine:
$active_sheet->getStyle('k3:AZ3')->getAlignment()->setTextRotation(90);

But this line will ruin the whole sheet.
$active_sheet->getStyle('BA3:BZ3')->getAlignment()->setTextRotation(90);
Same thing for
$active_sheet->getStyle('BA3')->getAlignment()->setTextRotation(90);

Same problem with
$active_sheet->getStyle($range)->applyFromArray($styleThinBlackBorderOutline);
If $range is within column A to AZ, it's fine. But it doesn't like BZ and beyond.

I have no problem setting text values using the following statement most of the time
$active_sheet->setCellValue('BA3", $header['content']);
but cannot set value for 'BR3', or 'BU3', etc.

Thanks!
Coordinator
Aug 26, 2013 at 12:04 PM
On 26/08/2013 02:00, haleysong wrote:

From: haleysong

I am having trouble setting style for columns/range beyond 'AZ', such as BA1, BQ2, etc

this is fine:
$active_sheet->getStyle('k3:AZ3')->getAlignment()->setTextRotation(90);

But this line will ruin the whole sheet.
$active_sheet->getStyle('BA3:BZ3')->getAlignment()->setTextRotation(90);
Same thing for
$active_sheet->getStyle('BA3')->getAlignment()->setTextRotation(90);

Same problem with
$active_sheet->getStyle($range)->applyFromArray($styleThinBlackBorderOutline);
If $range is within column A to AZ, it's fine. But it doesn't like BZ and beyond.

I have no problem setting text values using:
$active_sheet->setCellValue('BZ3", $header['content']);

Thanks!
There is no built-in limitation on columns, other than memory and the limitations built into MS Excel itself, so this should work. If it doesn't, then is it a problem with all writers, or with specific writers?

-- 
Mark Baker
Aug 27, 2013 at 8:30 AM
Edited Aug 27, 2013 at 8:50 AM
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007") had the same issue as $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel)

PHPExcel_Writer_Excel5 was good for setTextRoation and setCellValue but still fails on
$active_sheet->getStyle($range)->applyFromArray($this->styleThinBlackBorderOutline)

Not good for set color either
$active_sheet->getStyle($cell)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
$active_sheet->getStyle($cell)->getFill()->getStartColor()->setRGB('cc99ff');

I didn't try PHPExcel_Reader_Excel2003XML cause it looks too limiting.

Ideas? Thanks!!
Sep 24, 2013 at 9:29 AM
bump. Haven't figured out the limitation. Please help!