答案 0 :(得分:0)
嗨,我在alasql文件中做了一些小的更改
// alasql
Object.objsize = function(Myobj) { var osize = 0, key; for (key in Myobj) { if (Myobj.hasOwnProperty(key)) osize++; } return osize; };
var bigtable = undefined; var tableindex = 0; var reqSize = undefined;
data.forEach(function(entry, index) { var objsize = Object.objsize(entry); if(reqSize == undefined){ reqSize = objsize; bigtable = tableindex; } if(reqSize < objsize){ bigtable = tableindex; reqSize = objsize; } ++tableindex; }) columns = Object.keys(data[bigtable]).map(function(columnid) { return {columnid: columnid}; });
//您的HTML
名称 数 普拉山斯 756943912X 电子邮件 公司 经验 prasanthreddy568@gmail.com ami神 4年//您的脚本var fileName =“ Users”; data1 = alasql('SELECT * FROM HTML(“#table1”,{header:true})'); data2 = alasql('SELECT * FROM HTML(“#table2”,{header:true})');数据= data1.concat(data2); alasql('SELECT * INTO CSV(“'+ fileName +'”,{headers:false})FROM?', [数据]);