First, will beExcelSave data astxtfile
650) this.width=650; "title=" clip_image001 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; margin:0px; padding-right:0px "border=" 0 "alt=" clip_image001 "src=" http://s3.51cto.com/wyfs02/M00/93/2B/ Wkiom1kimimtgsqiaaarr5awqoo635.png "" 297 "height=" 141 "/>
650) this.width=650; "title=" clip_image003 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; margin:0px; padding-right:0px "border=" 0 "alt=" clip_image003 "src=" http://s3.51cto.com/wyfs02/M00/93/29/ Wkiol1kimizgmpzvaacvqg9ghio127.jpg "" 554 "height=" 389 "/>
Second, will betxtCopy files toMySQLin the server
guarantee txt file in mysql No garbled in system
650) this.width=650; "title=" clip_image004 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; margin:0px; padding-right:0px "border=" 0 "alt=" clip_image004 "src=" http://s3.51cto.com/wyfs02/M01/93/2B/ Wkiom1kimi3wkjs5aaasyqjvi3e813.png "" 281 "height="/>
third, creating libraries and tables
CREATE TABLE ' List2 ' (
' name ' varchar (DEFAULT NULL),
' changjia ' varchar DEFAULT NULL,
' weight ' varchar DEFAULT NULL,
' count ' varchar (+) DEFAULT NULL
) Engine=innodb DEFAULT Charset=utf8;
Four, import txt data
mysql> Load Data local infile '/opt/aaa.txt ' into table list2 character set UTF8;
Five, query
650) this.width=650; "title=" clip_image005 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; margin:0px; padding-right:0px "border=" 0 "alt=" clip_image005 "src=" http://s3.51cto.com/wyfs02/M01/93/2B/ Wkiom1kimi7comataaabj9maq9s343.png "" 353 "height=" 229 "/>
650) this.width=650; "title=" clip_image007 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image007 "src=" http://s3.51cto.com/wyfs02/M02/93/29/ Wkiol1kimjgwwwxlaab-mlxojzy804.jpg "" 554 "height=" 238 "/>
Import Excel data into MySQL