简体   繁体   English

CSV文件到phpmyadmin导入错误

[英]csv file to phpmyadmin import error

here is the pattern of my csv file 这是我的csv文件的模式

--------------------------------------------------------------
|   col1    |   col2   |           |   col4   |            |  
--------------------------------------------------------------
|   col1    |   col2   |           |   col4   |            |   
--------------------------------------------------------------
|   col1    |   col2   |           |   col4   |            |   
--------------------------------------------------------------
|   col1    |   col2   |           |   col4   |            |   
--------------------------------------------------------------
|   col1    |   col2   |           |   col4   |            |   
--------------------------------------------------------------
|   col1    |   col2   |           |   col4   |            |  
-------------------------------------------------------------- 

i have something like this, empty columns on the table in .csv file in excel 2010. empty column has default data set in phpmyadmin. 我有类似的东西,在Excel 2010中.csv文件中的表上的空列。空列在phpmyadmin中设置了默认数据。 while importing it's throwing Invalid column count in CSV input on line 1. 导入时在第1行的CSV输入中抛出无效的列数。

how can i solve this? 我该如何解决?

thanks in advance.! 提前致谢。!

Edit: 编辑:

here is the sample of my csv file 这是我的csv文件的示例

-----------------------------------------------------------------------------
|   9    |   6   |           |   Yes, Capacitive   |   3.5 Inches   |      |
-----------------------------------------------------------------------------
|   9    |   6   |           |   Yes, Capacitive   |   4.5 Inches   |      |  
-----------------------------------------------------------------------------
|   9    |   6   |           |   Yes, Capacitive   |   4.5 Inches   |      |   
-----------------------------------------------------------------------------
|   9    |   6   |           |   Yes, Capacitive   |   3.5 Inches   |      |   
-----------------------------------------------------------------------------
|   9    |   6   |           |   Yes, Capacitive   |   4.5 Inches   |      |  
-----------------------------------------------------------------------------
|   9    |   6   |           |   Yes, Capacitive   |    4 Inches    |      | 
----------------------------------------------------------------------------- 

first row ends at eight line and u can see some of the data cells dont have quotes, why it's not including by default?? 第一行在八行结束,您可以看到一些数据单元格没有引号,为什么默认情况下不包括引号?

All that i did is 我所做的就是

  1. Imported the file. 导入文件。
  2. selected the Format to CSV using load data 选择使用加载数据格式为CSV
  3. Replaced Columns separated with: to comma(,) 替换为:以逗号分隔(,)
  4. then press GO. 然后按GO。

DONE 完成

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

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