I have a sql database in which i want to export some tables in CSV format. Users and purchases.
我有一个sql数据库,我想在其中导出一些CSV格式的表。用户和购买。
By using phpmyadmin, > Export function i've successfully exported all data in table but there are no headers (column title) in the excel sheet and its very confusing to determine data retrieved from that table.
通过使用phpmyadmin,>导出功能我已成功导出表中的所有数据,但excel表中没有标题(列标题),并且确定从该表中检索的数据非常混乱。
its look like this:
它看起来像这样:
And i need it like this:
我需要这样:
Any suggestion how to do this?
有什么建议怎么做?
1 个解决方案
#1
10
This works for me. What version of phpmyadmin do you have?
这对我有用。你有什么版本的phpmyadmin?
- Under
Browse
, click on the table you want to export. - 在“浏览”下,单击要导出的表。
- At the bottom, in the
Query results operations
section, click onExport
. - 在底部的“查询结果操作”部分中,单击“导出”。
- In
Export method
, chooseCustom
. - 在导出方法中,选择自定义。
- Change
Format
toCSV for MS Excel
. - 将格式更改为MS for MS Excel。
- Under
Format-specific options
, checkPut columns names in the first row
. - 在特定于格式的选项下,选中将列名称放在第一行中。
#1
10
This works for me. What version of phpmyadmin do you have?
这对我有用。你有什么版本的phpmyadmin?
- Under
Browse
, click on the table you want to export. - 在“浏览”下,单击要导出的表。
- At the bottom, in the
Query results operations
section, click onExport
. - 在底部的“查询结果操作”部分中,单击“导出”。
- In
Export method
, chooseCustom
. - 在导出方法中,选择自定义。
- Change
Format
toCSV for MS Excel
. - 将格式更改为MS for MS Excel。
- Under
Format-specific options
, checkPut columns names in the first row
. - 在特定于格式的选项下,选中将列名称放在第一行中。