Bug #12545 Import from decimal colums through MySQL 3.51.12 tresults in text not number
Submitted: 12 Aug 2005 9:45 Modified: 24 Jul 2007 17:32
Reporter: Rainer Krug Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.12 OS:Windows (Windows 2000)
Assigned to: Jim Winstead CPU Architecture:Any
Tags: ODBC5-RC

[12 Aug 2005 9:45] Rainer Krug
Description:
Importing / linking of data from MySQL 5.0.10a into Excel from a decimal column results in representation of the column as text (left aligned in cells) and not in numbers. If table is in MySQL 4.1.9 it is recognised as number (right aligned).

The same applies to open office - but I only tried it with MySQL 5.0.10a not 4.1.9

This causes problems if the data is analysed with e.g. Pivot tables which requires numbers in operations like summing the data.

Office 2003 sp1
Windows 2000
MySQL 5.0.10a (on Windows XP)
MySQL 4.1.9 (on Windows XP)

How to repeat:
Import / link table with decimal columns in Excel and look at the imported records.
[12 Aug 2005 17:15] Jorge del Conde
Thanks for your bug report.

I was able to reproduce this using WinXP / SP2 & Excel 2003 w/latest updates.
[21 Mar 2006 8:08] Deepak Sharma
Hi,

I have the same issue here. select sum((sellPrice + cPrice) * qty) as subtotal from

Is there a fix to the issue? I recently upgraded from 4.1 to 5.0.

Thanks.

Deepak Sharma
http://www.orientindia.biz
[21 Jul 2007 2:03] Jim Winstead
This might be fixed by the in-progress patch for Bug #19345. (The problem is that 5.0+ returns a new type for decimal columns which the driver wasn't handling for the SQL_DESC_FIXED_PREC_SCALE attribute, and Excel may be keying off that.)
[24 Jul 2007 17:32] Jim Winstead
I was not able to reproduce this bug using Connector/ODBC 3.51.17 and Microsoft Excel 2003.