Bug #69220 Append doesn't automatically detect Excel col header with same name as SQL field
Submitted: 13 May 2013 22:33 Modified: 24 Sep 2013 16:59
Reporter: Ward Williams Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S3 (Non-critical)
Version:1.1.0 OS:Windows
Assigned to: CPU Architecture:Any
Tags: append, headers

[13 May 2013 22:33] Ward Williams
Description:
For some reason, MySQL for Excel refuses to automatically map one of the 10 Excel columns to the MySQL table when the names of the Excel header row are the same as the MySQL column names.

I have a screenshot that shows the issue (not sure how to send it in this bug report), but here's the basic idea:

I have an Excel tab that looks like this (where the commas = column separators):

Employee,ID,notes
Joe,123,foo

I try to append this to my MySQL table with field Employee,ID,some_col,notes.

And I use 'Automatic' mapping with 'First row contains column names', which correctly maps Employee to Employee, ID to ID, and correctly does NOT map some_col to anything in my Excel, BUT it does NOT correctly map 'notes' to 'notes'!  I've tried changing 'notes' to other columns in the MySQL table (say, some_col), and this also fails.

I tried closing & reopening Excel & the MySQL connection, and that didn't work.

I messed around with this some more, and it seems to happen a little randomly.  Maybe it's a 'data validation' issue?  Seems to happen with long VARCHAR fields.  (The 'notes' one is VARCHAR (255).)

How to repeat:
Not sure, since this only happens with ONE of the columns I'm using...
[13 May 2013 22:35] Ward Williams
Word doc with screenshot of issue attached.  Also, I should've noted that VARCHAR length doesn't seem to have anything to do with the issue, since the 'excerpt' field mapped fine, and it's VARCHAR(4096).
[13 May 2013 22:36] Ward Williams
Screenshot of the mapping problem described

Attachment: MySQL for Excel Append automatic column mapping bug.docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document, text), 71.54 KiB.

[14 May 2013 22:52] MySQL Verification Team
Thank you for the bug report. Could you please provide a test case with excel file and the create table statement. Thanks.
[15 Jun 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[24 Sep 2013 16:59] Philip Olson
Fixed as of MySQL for Excel 1.1.2, and here's the changelog entry:

After appending data, sometimes the name of the last column would not be
detected when data was later inserted.

Thank you for the bug report.