column width in other locale

Aug 18, 2008 at 11:50 AM
There was a discussion about germany locale and bug in PHPExcel with ‘,’ against ‘.’ in column widths. As I understand the bug was fixed in next releases. But it has not died in ru_RU locale.

The simple code does not work:
setlocale(LC_ALL, "ru_RU.CP1251");
require_once  'PHPExcel/IOFactory.php';
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load("template/inv.xlsx");  //the .xlsx file has column with non-default width
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');

And the second feature: after changing locale to ru_RU PHPExcel works well only with rounded row heights (like 15,00, 20,00, 100,00 etc.).  Any non-rounded height (like 15,75 or 20,15) will corrupt output file. Rounding column widths does not help anyway.

I tested this code with latest sources from SVN (Changeset 16265).
Aug 18, 2008 at 1:15 PM
Can you send me the XLSX file? (maarten ---at--- php excel ---dot--- net)
Aug 19, 2008 at 5:37 AM
Hello, Maarten!

Welcome back from vocation.  I have sent my file. It is totaly empty. The only feature is first column has non-default width.

Aug 19, 2008 at 2:13 PM
Aug 20, 2008 at 10:55 AM
Well, after simple test with column width I was delighted  “It works!”.  But the work with real .xlsx file was not so successful. There was very similar error again. After few experiments I have localized it. It’s non- default font with ru_RU now. Maybe there are something other errors hiding in this file. I don’t know. What have I to do?

This file is one of my templates, as I told you before your vocation. It’s “heavy formatted”. It has “boldings”, “sizing”, cell margins, alignments, wraps, borders and filter. Basically I need to read and rewrite it with all formatting.

And interesting feature is that it works on old Windows server even with old sources.
Help me.