0

这是示例代码:

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

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

4

1 回答 1

0

使用 put first record of xxx 解决

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
于 2021-09-27T09:03:43.577 回答