Excel 导出 CSV 导入 PHPmyAdmin
我可以执行此过程,但我想更改 Excel 中分隔数据、列和行的值。
目前,每个字段不包含在 '' 中,仅用逗号分隔。
我的问题是。有没有办法在Excel中定义这些东西?
谢谢
编辑: 我的意思是我可以定义什么字符终止该行的末尾吗?我可以定义单元格内容应该在“单引号”之间,您可以在导入时在 PHPmyAdmin 中更改所有内容。原因是 PHPmyAdmin 目前无法判断单元格内容或行结束的位置。
I can do this process, but I want to change the values in excel that seperate the data and columns and lines.
At the moment each field is not contained in '' and is only seperated by a comma.
My question is. Is there a way to define these things in Excel?
Thanks
EDIT:
I mean can i define what character terminates the end of the line. Can I define that a cells contents should be between 'single quotes' all the things you can change in PHPmyAdmin on import. The reason being that PHPmyAdmin cannot tell where a cells contents or row ends at the moment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道我在使用 PHPMyAdmin 时也遇到过类似的问题。最简单的事情就是尝试其他选择。其中之一应该有效。这里有一些替代方案。
PHPMyAdmin 可以原生导入 Excel 电子表格。您只需保存电子表格即可。
PHPMyAdmin 可以原生导入 Excel 导出的 CSV 文件。我认为如果它不起作用,您可能有一些设置不正确。在 PHPMyAdmin 中尝试不同的选项。
您无法在 Excel 中自定义终止字符、分隔符等。您可以从 Windows 外部自定义分隔符。请参阅此处:http://www.ozgrid.com/forum/ showthread.php?t=134498&page=1
另一种选择是从 Excel 保存 CSV 文件。 PHP 内置了用于导入/导出 CSV 文件的函数。您可以在 PHP 中导入 CSV 文件。然后,您可以使用自定义分隔符等输出 CSV,使用内置函数并执行您想要执行的其他操作。请参阅:http://php.net/manual/en/function.fgetcsv.php
I know I've had similar issues with PHPMyAdmin. The easiest thing is try other options. One of them should work. Here are some alternatives.
PHPMyAdmin can natively import Excel spreadsheets. You can just save the spreadsheet.
PHPMyAdmin can natively import Excel exported CSV files. I think you might have something set incorrectly if it is not working. Try a different option in PHPMyAdmin.
You cannot, within Excel, customize termination characters, delimiters etc. You can customize delimiters externally from Windows. See here: http://www.ozgrid.com/forum/showthread.php?t=134498&page=1
Another alternative, save the CSV file from Excel. PHP has built in functions for importing/exporting CSV files. You can import CSV files in PHP. You can then output CSV using custom delimeters, etc. using the built in functions and doing what ever other manipulations you want to do. See: http://php.net/manual/en/function.fgetcsv.php
使用本教程创建 VB 宏。您只需修改代码以使用单引号而不是双引号。
http://www.markinns.com/articles/full/export_excel_csvs_with_double_quotes
Use this tutorial to create a VB macro. You'll just have to modify the code to use single quotes instead of double quotes.
http://www.markinns.com/articles/full/export_excel_csvs_with_double_quotes