Results 1 to 5 of 5

Thread: Export Mysql to Excel Worksheet

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    82

    Export Mysql to Excel Worksheet

    Hy there!

    I have a problem. Inside one of my application I'm trying to do some exports. Exporting data from Access Database to excel worksheet works really fine but exporting from Mysql database to Excel doesn't work at all.

    the SQL statement looks like this:

    "SELECT * INTO [Excel 8.0; DATABASE=" + ExcelFile + "].[" + WorkSheetName + "]"+ FROM MysqlTable"

    the statement for the Access Database is the same...

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Export Mysql to Excel Worksheet

    What errors are you getting?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    82

    Re: Export Mysql to Excel Worksheet

    the error sounds like this:

    You have an error in your SQL syntax; check the manual corresponding to your MySQL server version for the right syntax to use near '[Excel 8.0;DATABASE=C:\1.xls][tab] from' at line 1.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Export Mysql to Excel Worksheet

    Have you looked at the MySQL manual?

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export Mysql to Excel Worksheet

    That syntax is not standard SQL, it is purely for the Jet driver (which deals with Access/Excel/...), so you will need to find MySQL's equivalent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width