forums › forums › SQLyog › Using SQLyog › export to csv –want separate columns
- This topic is empty.
-
AuthorPosts
-
-
August 30, 2004 at 9:14 am #85511kyleMember
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.
-
August 30, 2004 at 9:25 am #162351kyleMember
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
-
August 30, 2004 at 11:04 am #16236ShadowMember
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.
-
September 7, 2004 at 1:27 pm #16237sjsMember
A Newbie Question:
What are the specific options needed for export to Excel?
And what options should be set?
Thanks
-
September 8, 2004 at 9:48 am #16238ShadowMember
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.