使用标题导出CSV表格

时间:2022-11-24 23:24:44

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:

它看起来像这样:

使用标题导出CSV表格

And i need it like this: 使用标题导出CSV表格

我需要这样:

Any suggestion how to do this?

有什么建议怎么做?

1 个解决方案

#1


10  

This works for me. What version of phpmyadmin do you have?

这对我有用。你有什么版本的phpmyadmin?

  1. Under Browse, click on the table you want to export.
  2. 在“浏览”下,单击要导出的表。
  3. At the bottom, in the Query results operations section, click on Export.
  4. 在底部的“查询结果操作”部分中,单击“导出”。
  5. In Export method, choose Custom.
  6. 在导出方法中,选择自定义。
  7. Change Format to CSV for MS Excel.
  8. 将格式更改为MS for MS Excel。
  9. Under Format-specific options, check Put columns names in the first row.
  10. 在特定于格式的选项下,选中将列名称放在第一行中。

#1


10  

This works for me. What version of phpmyadmin do you have?

这对我有用。你有什么版本的phpmyadmin?

  1. Under Browse, click on the table you want to export.
  2. 在“浏览”下,单击要导出的表。
  3. At the bottom, in the Query results operations section, click on Export.
  4. 在底部的“查询结果操作”部分中,单击“导出”。
  5. In Export method, choose Custom.
  6. 在导出方法中,选择自定义。
  7. Change Format to CSV for MS Excel.
  8. 将格式更改为MS for MS Excel。
  9. Under Format-specific options, check Put columns names in the first row.
  10. 在特定于格式的选项下,选中将列名称放在第一行中。