Unsupported Screen Size: The viewport size is too small for the theme to render properly.

export to csv –want separate columns

forums forums SQLyog Using SQLyog export to csv –want separate columns

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #8551
      1kyle
      Member

      I've just strted using this product and find it's great –just what I've been looking for.

      This question might have already been answered but I can't find it so I'll try again.

      I've got a table in a database with 4 fields.

      When I export this as a CSV file to EXCEL the data all gets loaded into 1 column of the spreadsheet rather than 4. It's not a show stopper but I'd rather have this loaded into 4 columns than do it manually.

      Here's the table data

      ID int(11)

      Name char(35)

      CountryCode char(3) District char(20) Population int(11)

      when I look at the csv file created it just puts all the data in one row line by line without breaking it up into columns.

      Any Ideas.

      Thanks (and sorry if this has already been covered as I couldn't find it).

      I'm using MySQL version 4.0 and EXCEL XP running under Windows XP Pro with service pack 2 applied.

    • #16235
      1kyle
      Member

      Found the answer.

      1) Export your data as CSV

      2) instead of opening EXCEL direct rename the file to a .TXT file.

      3) Open the file in excel as a TXT file.

      4) Excel will then prompt saying This is a delimited file etc.

      5) Chose the delimited option

      6) He Voila — your data is in nice columns.

      Cheers

      everbody

      -K

    • #16236
      Shadow
      Member

      SQLyog calls the export file CSV even if the field separator is not comma. Try exporting to CSV format with comma set as separator and then it should work as expected.

    • #16237
      sjs
      Member

      A Newbie Question:

      What are the specific options needed for export to Excel?

      export1.gif

      And what options should be set?

      export2.gif

      Thanks

    • #16238
      Shadow
      Member

      Minimum requirement: fields separated by ',' and lines terminated by 'rn'. Escape characters depend on your data (I use none). It might be useful to add column names to the export file as well.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.