茄子 - 如何将动态值存储到 excel 单元格中

Eggplant - how to store dynamic values into excel cells

示例代码如下:

set myExcelDB to {type:"excel", file:ResourcePath(testRunFilePath), name:"TestRun" ,writable: Yes} 
put the records of myExcelDB into allTestRunRecords

repeat with each item of allTestRunRecords


put 1 into counter
put counter into currentRow.passed //why is this counter number not updated into my excel file?

end repeat

我已将 运行 window 中的计数器值存储到 currentRow.passed 字段中,但 excel 未更新。我错过了什么吗? 我想存储到当前行的“通过”列。

用xxx的put first记录解决

set myExcelDB to {type:"excel", file:ResourcePath(testRunFilePath), name:"TestRun" ,writable: Yes} 
put the records of myExcelDB into allTestRunRecords

repeat with each item of allTestRunRecords

put the first record of myExcelDB where ("ID") is it.ID into currentRow
put counter into currentRow.passed 

end repeat