aardio 读取excel数据

admin2021-03-31  3.1K+

//读取有数据的行列
import com.excel;
import console;

console.log("请稍候......")
var excel = com.excel()
excel.Visible = false; //使Excel窗口可见
excel.alerts = false; //关闭所有操作提示

var book = excel.Open("/test.xlsx") //打开xls文件

var sheet = excel.ActiveWorkbook.Sheets(1);
for(i=1;sheet.UsedRange.Rows.Count;1){
    for(j=1;sheet.UsedRange.Columns.count;1){
        console.log( sheet.Cells(i,j).value);
    }
}

   
console.pause();
excel.Quit(); //退出

转载请注明原文地址: https://aardio.net/read-165.html
最新回复(0)
源码分享
aardio源码分享