51Testing软件测试论坛

标题: 'ddt_get_row_count' function is not refreshing [打印本页]

作者: liujinkui    时间: 2009-8-11 13:22
标题: 'ddt_get_row_count' function is not refreshing
When I change the size of my Excel file the ddt_get_row_count function will not refresh to a lower value.
Code:
_____________________________________________________________

Row_Count = null;
My_File = "c:\\documents and settings\\Testing.xls";
rc = ddt_open(My_File);
if (rc!= E_OK && rc != E_FILE_OPEN)
pause("Cannot open table.");
ddt_get_row_count(My_File,Row_Count);

____________________________________________________________

Row_Count was stuck on 17. The last file size. Testing.xls file was changed to 30 rows, Row_Count updated to 30. When I reduced Testing.xls to 4 rows Row_Count=30. I have closed WR and ran the script again but Row_Count remains at 30. Is there some way to 'clear the cache'? As I increment the .xls above the last Row_Count it will increment but not decrement/refresh.

转自
http://www.sqaforums.com/showfla ... p;page=0#Post576782
作者: leoling    时间: 2011-5-11 14:01
Try deleting the entire row instead of deleting/clearing cells. Excel seems to leave a residue on rows that just have their cells deleted/cleared.




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2