Set custom separator for sscovert

Hi all,

I am exporting data from mysql table and need to represent data in xlsx file.
So, i am using below query to export data to csv:

SELECT * INTO OUTFILE 'OUT.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' FROM $TABLE;

and then using ssconvert to convert from csv to xlsx:

ssconvert  OUT.csv FILE.xlsx

But the problem is that in the file there is fields where " symbol used so I am getting shift in the fields.

DB View:

image uploader

CSV View

image uploader

If I replace FIELDS TERMINATED BY to other symbol or ENCLOSED BY '\"' to other, then i am getting problems with ssconvert command since I can't specify field separator etc, so I am stuck with this issue :frowning:

Is here anyone who was using extract data from DB to csv and from csv to xlsx and how such problem was solved?

---------- Post updated at 02:52 PM ---------- Previous update was at 12:49 PM ----------

Hi all,

Maybe it will be usefull for someone, problem has been solved by removin ENCLOSED BY '\"'

1 Like

Thanks for sharing your solution.