Bug #67663 Using MySQL for Excel in France
Submitted: 21 Nov 2012 15:39 Modified: 12 Mar 2013 2:05
Reporter: Tansu KAYRAK Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S1 (Critical)
Version:1.1.0 OS:Windows
Assigned to: CPU Architecture:Any
Tags: comma, floating, france, french

[21 Nov 2012 15:39] Tansu KAYRAK
Description:
In France, under Excel, all the floating numbers are written like : 12,45€ instead of 12.45€

This gives the following querry when I try to commit an entry :

Deleting 0, Inserting 1, Updating 0 row(s) with the following SQL statement(s):
001: INSERT INTO `world`.`country` (`Code`,`Name`,`Continent`,`Region`,`SurfaceArea`,`IndepYear`,`Population`,`LifeExpectancy`,`GNP`,`GNPOld`) VALUES ('TK','Tans','Africa','Eastern Africa',390757,1980,11669000,37,8,5951,8670)
MySQL Error 1136:
Column count doesn't match value count at row 1

The value 37,8 is considered as 2 different columns instead of one single number.

How to repeat:
- Install Excel with French language package
- Install MySQL for Excel
- Access an existing MySQL table
- Commit a new entry containing a floating number value

Suggested fix:
In the generated SQL query, all the numbers should be formated with a function replacing ',' by '.' in case there are no double quotes around the column value.
[21 Nov 2012 16:15] MySQL Verification Team
Thank you for the bug report.
[12 Mar 2013 2:05] Philip Olson
Fixed as of MySQL for Excel 1.1.1, and here's the changelog entry:

On systems that define number format using European regional settings,
MySQL for Excel would fail on "INSERT" because it would attempt to split these
into two numbers at the comma. As a result, the query would fail with an
error such as "Column count doesn't match value count." These commas are
now converted to periods.

Thank you for the bug report.