Bug #78358 Export Data - Data type not detected correctly when only first row contains data
Submitted: 8 Sep 2015 2:48 Modified: 23 Oct 2015 0:14
Reporter: Javier Treviño Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S3 (Non-critical)
Version:1.3.4 OS:Any
Assigned to: CPU Architecture:Any

[8 Sep 2015 2:48] Javier Treviño
Description:
When selecting data on an Excel worksheet to export it to a new MySQL table, for columns where only their first row contains data (and the rest of the rows do not) the datatypes are not detected at all and all columns are set to "VarChar(255)" which is the default data type set when there is NO data at all on the column.  So it looks like the data on the first row is not being taken in consideration at all on the data types detection process.

How to repeat:
1. Activate MySQL for Excel
2. In Excel select a data range containing data where 1 or more columns have data only on the first row but not on the rest (preferably numeric data)
3. Click on Export Excel Data to New Table
4. Uncheck the "First Row Contains Column Names" checkbox
5. Click on any of the columns that only contain data on the first row and note the detected data type is set to "VarChar(255)" even when the data on the first row may be numeric.
[9 Sep 2015 2:11] Javier Treviño
Posted by developer:
 
Fixed the data type detection logic for a column's data that was failing when only the first row of data contained data but the rest of the rows were empty.
[25 Sep 2015 18:01] Javier Treviño
Posted by developer:
 
Fixed the data type detection logic for a column's data that was failing when only the first row of data contained data but the rest of the rows were empty.
[23 Oct 2015 0:14] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL for Excel 1.3.5 release, and here's the changelog entry:

Change the data type detection logic for a column's data that was failing
when only the first row of data contained data, when the rest of the rows
were empty.

Thank you for the bug report.