I’ve been given a mySQL database from a custom-coded CMS and I need to get its data into a CSV file for importing into Excel for further futzing.
The problem is that the data in the database has a lot of HTML code in it (<p class="foo">
and that type of thing), so exporting as a CSV gets screwed up as some of the text has commas and other control characters in it.
Looked at all the export options via phpMyAdmin but couldn’t really find anything that would work.
How can I get this into Excel?
2
Answers
Actually, by searching here I found the answer tho had to take a bit of a different approach.
I used
t
as the separator (tab character), Columns enclosed with~
, Columns escaped by, put column names in the first row.
I had to use LibreOffice to import the sheet as Excel didn't have the flexibility needed. Got it working now!
Try tu use MySQL Workbench and there’s excel xml export format, it should work also with html inside.