Reading percentage values vecomes f% - example file

Topics: User Forum
Jun 6, 2011 at 3:04 PM

Example file:
http://www.steinhaug.no/assets/files/excel_test.xlsx

Example code:
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load('test.xlsx');
$objPHPExcel->setActiveSheetIndex(0);
$array = $objPHPExcel->setActiveSheetIndex(0)->toArray(null, true, true, true);
$excel = new PHPExcel();
$excel->getActiveSheet()->fromArray($array,NULL,'A1',true);
$array = $excel->setActiveSheetIndex(0)->toArray();
$objPHPExcel->getActiveSheet(0)->fromArray($array,NULL,'A1',true);
$objPHPExcel->removeSheetByIndex(1);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('test_new.xlsx');

Problem:
The percentage field will not be copied correctly and is replaced with f%, I am not able to solve this it seems. Anyone have some input? 

What does the file do?
Check this thread, http://phpexcel.codeplex.com/discussions/259505