I need to import mysql datas to an excel file. I'm using php7. I wrote a code but the problem is all the data are printed in a single column in excel file. Could anyone help me with code to change the row and column in excel file. This is my code: ` I need to import mysql datas to an excel file.