简体   繁体   English

如何将phpmyadmin表导出到csv?

[英]how to export phpmyadmin table into csv?

I want to export a table of a database on phpMyAdmin into csv file. 我想将phpMyAdmin上的数据库表导出到csv文件中。 I tried SELECT * FROM Table_Name into outfile'D:/wamp/www/projectName/fileName.csv'; 我尝试将SELECT * FROM Table_Name into outfile'D:/wamp/www/projectName/fileName.csv'; but it's very ugly. 但这很丑。 How to make it more presentable? 如何使其更具表现力? Thank you in advance. 先感谢您。

So you want it in Excel, in the end? 最后,您要在Excel中使用它吗? In phpMyAdmin, view the table. 在phpMyAdmin中,查看表。 In the tabs at the top, choose "Export". 在顶部的标签中,选择“导出”。 Choose whichever Excel format you want from the list at the left-hand side. 从左侧列表中选择所需的Excel格式。 Choose the options you want, hit "Go". 选择所需的选项,点击“开始”。

(If you just want CSV, this screen also gives you a friendly way of adjusting the CSV options, eg using a comma rather than a semicolon as the separator, which will probably go down better with Excel and other CSV importers.) (如果您只想要CSV,则此屏幕还为您提供了一种友好的方式来调整CSV选项,例如使用逗号而不是分号作为分隔符,这对于Excel和其他CSV导入器来说可能会更好。)

PHPMyAdmin导出界面

从Excel转到“数据-(导入)”,然后从“文本”中选择“定界”,然后选择“;”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM