一、Excel表只留内容,不要表头
二、将XLSX另存为为CSV
我是用的Office,不知道WPS能不能用。
最好和等会新建连接放在一起
三、在test.csv目录下进入cmd
四、四步命令
1.打开/新建sqlite连接
sqlite3 SQLite.db
2.建表
create table compareTable(density text,tem0 real,tem10 real,tem20 real,tem25 real,tem30 real,tem40 real,tem50 real,tem60 real,tem80 real,tem100 real);
3.说明分隔符是','。感觉这步可以省略,因为另存为CSV的时候就说了是逗号分隔的。不过我没试验
.separator ','
4.导入CSV到刚刚建的表
.import test.csv compareTable
或者用绝对路径
.import D:/YJ/test.csv compareTable