This commit is contained in:
aozhiwei 2024-08-23 17:52:52 +08:00
parent 241a323491
commit 9c3ffa776f

View File

@ -0,0 +1,24 @@
const exceljs = require('exceljs');
async function main() {
const workbook = new exceljs.Workbook();
const dataBook = await workbook.xlsx.readFile('/home/kingsome/打金测试-GOLD模式产出金币数据.xlsx');
dataBook.eachSheet((sheet, sheetIndex) =>{
//console.log(sheet.name, sheetIndex);
if (sheet.name == '打金模式产出金币数据') {
let isFirstRow = false;
sheet.eachRow((row, index) => {
//const name = row.getCell(1).value();
if (!isFirstRow) {
isFirstRow = true;
return;
}
const accountId = row.getCell(2).value.toLowerCase();
const gold = row.getCell(3).value;
console.log(accountId, gold);
});
}
});
}
main();