Forum Discussion
Rajesh2all of the methods and properties used below are same as Excel via COM there is no difference
Excel = Sys.OleObject["Excel.Application"]
Excel.Workbooks.Open("C:\\Users\\TESTPC\\Desktop\\Cochlear_CSEP2.xlsx").Sheets.Item["TC_Nav_ SP_Implant"]
RowCount = Excel.ActiveSheet.UsedRange.Rows.Count
ColumnCount = Excel.ActiveSheet.UsedRange.Columns.Count
Can anyone help me with this:
def get_test_suite(test_case_container):
tests_to_run = [] # creating an empty list
while not test_case_container.EOF():
if test_case_container.Value["TCID"] == "1138":
tests_to_run.append(test_case_container.Value["Ctrl_ID"])
test_case_container.Next()
return tests_to_run
def testd():
test_case_container = DDT.ExcelDriver("C:\\Users\\admin\\Desktop\\xyz.xlsx", "TC_Nav", True)
A = [get_test_suite(test_case_container)]
Log.Message(str(A))
I want to fetch the value of 1st ctrl_ID.. Then next ctrl_id
I have the table attached.
- baxatob8 years agoCommunity Hero
... while not test_case_container.EOF(): if test_case_container.Value["TCID"] == "Ctrl_ID": Log.Message(test_case_container.Value["TC1138"] ...But this is still not optimal way, imho.
I suggest to use: