I am able to export table's data into CSV file but unable to export these data into excel file. Is here any query to export these data into excel file.
I am using this query to export data as a CSV file.
SELECT *
INTO OUTFILE 'C:/your-directory/your-filename.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM tableName
I used this for excel file after change file name like your-filename.xls
but its adding extension .xls but giving data like csv.