我正在使用 alasql 转换为 CSV:
data = ["402 Fourth Avenue", "11 Russell Avenue", "East Diamond Avenue"];
function exportData(list) {
alasql.promise('SELECT * INTO CSV("test.csv", {separator:" "} ) FROM ?',list)
.then(function(data){
console.log('Data saved');
}).catch(function(err){
console.log('Error:', err);
});
}
当我通过函数传递它时,我的结果最终是这样的:
4 0 2 "F" "o" "u" "r" "t" "h" "A" "v" "e" "n" "u" "e"
我不知道为什么!提前谢谢你,你会让我开心的!