Importing / exporting data from Excel 2007 MySQL to UTF-8


To data from MS Excel 2007 export and import them into a MySQL database are a few careful step notwendig.Folgende Vorgensweise is recommended, the encoding of the data (visible through missing ÁáÀà is to ? or worse:) ) to ensure the export from Excel to MySQL.

  1. Copy the data to MS Excel
  2. bring in a table form
  3. Save as a csv file
  4. Open the csv in a text editor (I use Notepad )
  5. Check the last lines, there sneak generally a blank line and unnecessary semicolons
  6. Encoding of the file to UTF-8. This in Notepad : Coding>Encoding to UTF-8
  7. Create the MySQL database structure in PHPMyAdmin, Encoding of the text lines: utf8_general_ci
  8. Select Import, Coding: UTF-8, csv file to specify
  1. that only makes sense if the data belong to a table. as soon as it is a complex query, it will not work anymore