As of 3.3.1, Excel 97-2003 XLS Workbook imports seem to be broken.
Attaching SQL table structure (personaccess.sql) and XLS file to import (Personaccess import.xls).
Import yields the error message:
Fel
SQL-fråga:
CREATE TABLE IF NOT EXISTS `linademodb`.(
`A` int( 1 ) ,
`B` int( 3 )
) ENGINE = MYISAM ;
MySQL sa:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`A` int(1), `B` int(3)) ENGINE=MyISAM' at line 1
Notice how the table name has been omitted in:
CREATE TABLE IF NOT EXISTS `linademodb`.(
...even though the table in question has been selected prior to clicking the Import tab.
Table structure of table "personaccess"
XLS file to import into the "personaccess" table
Importing the xls file you provided seems to work.
I my case the data was imported into 'Blad1', (The name of the sheet with the data in the xls-file is 'Blad1'.)
Might this be related to bug #2973277 (Excel 97-2003 exports and include path) you reported?
This problem seems to be caused by AIX iconv() (used by PHPExcel) as well.
After having applied the path in bug #2974687, which should appear in the next version (1.7.3?) of PHPExcel, imports work fine. Please feel free to patch the current version of the bundled PHPExcel version with the patch in bug #2974687 in the mean time.
Similar to bug #2974687, this actually affects phpMyAdmin 3.3.0 and up as that was the introduction of PHPExcel in phpMyAdmin.
Just like you said, the import creates a table with the same name as the worksheet (Blad1) so one has to make sure that the worksheet has the correct table name.
Thanks for debugging. We'll keep an eye open for a future release of PHPExcel
This bug was fixed in repository and will be part of a future release; thanks for reporting.
I tested the fix (PHP 5.2.6, i386, linux) : export/import of Excel 97-2003 still works.
Couldn't test on IBM AIX. Please test this when version 3.3.3 is released.
We plan on upgrading the PHPExcel library in a future phpMyAdmin release (3.4 >), once your patch is included in a PHPExcel release.