Excel5 Open File Error

Feb 2, 2010 at 10:19 AM
Edited Feb 2, 2010 at 10:41 AM

Hello

$sheet->getStyle('A0:O' . ($index+1))->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
                     $sheet->getStyle('A0:O' . ($index+1))->getBorders()->getRight()->setBorderStyle(PHPExcel_Style_Border::BORDER_MEDIUM);
                     $sheet->getStyle('A0:O' . ($index+1))->getBorders()->getLeft()->setBorderStyle(PHPExcel_Style_Border::BORDER_MEDIUM);
                     $sheet->getStyle('A0:O' . ($index+1))->getBorders()->getTop()->setBorderStyle(PHPExcel_Style_Border::BORDER_MEDIUM);
                     $sheet->getStyle('A0:O' . ($index+1))->getBorders()->getBottom()->setBorderStyle(PHPExcel_Style_Border::BORDER_MEDIUM);
                     $sheet->getStyle('A0:O' . $index)->getBorders()->getBottom()->setBorderStyle(PHPExcel_Style_Border::BORDER_MEDIUM);
                     $sheet->getStyle('A0:O3')->getBorders()->getBottom()->setBorderStyle(PHPExcel_Style_Border::BORDER_MEDIUM);
                     $sheet->getStyle('A0:O3')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
                     $sheet->getStyle('A0:O3')->getFill()->getStartColor()->setRGB("EAEAEA");

When I add this code I get the following error in Excel (only when I save document as Excel5, not Excel2007):

"Office has detected a problem with this file. To help protect your computer this file cannot be opened"

In details shows:
"The Office File Validation feature has blocked this file from opening as it may contain harmful content."

I use Office2010 (Beta)

 

Feb 2, 2010 at 2:11 PM

Found solution by myself :D I was selecting cells from "A0" whitch does not exists :D sorry ...