星期三, 8月 25, 2021

[Eggplant Functional] SenseTalk: 將Excel透過Database的方式來操作

除了透過檔案的方式來操作Excel,也可以將Excel透過Database的形式來操作。

個人更覺得更好操作。

以下範別就是想要把測試案例的結果另外存到一份Excel,這樣long testing就可以比較好撈資料




//連線Excel,開啟唯讀模式 

set myExcelDB to {type:"excel", file:excelPath, writable: Yes}

//sheet nametable name

put table worksheet of myExcelDB into sheetTable


//建立要寫入的物件


put the date into currentDateObj

put {TEST_CASE:testcase, DATA_JSON:valueWithJSONString,DATE:currentDateObj} into testresult

//寫入一列

add record testresult to table worksheet of myExcelDB 


Working with Excel as a Database

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails