Converting to Excel5 and Latin 1

Sep 7, 2007 at 3:18 PM

As all my data is utf8 encoded I was hoping, that saving as xlsx and then converting to xls would solve the issue with Excel5 not supporting utf8 - unfortunately it did not :(

The conversion is straight forward:

$objReader = new PHPExcelReaderExcel2007;
$objPHPExcel = $objReader->load('myfile.xlsx');

$objWriter = new PHPExcelWriterExcel5($objPHPExcel);

Is there any magic method, that will convert my data to Latin 1? Maybe a looping through every cell that is not empty or could the copy of the xlsx file be parsed though iconv?
Sep 10, 2007 at 6:03 AM
Iconv should do the trick, but there is no built-in function to loop over all cells.
You can however try the PHPExcel_Workbook's "getCellCollection" (associative array!) and do an iconv on that yourself?
Sep 11, 2007 at 11:23 AM
Sure - I can see how that's possible, but looping through <600 rows with 30-40 cells plain killed both my own server and the webhost. Guess there is no way around doing the decoding before writing it to the sheet.

Thanks for your suggestion.