in my new department i have to code with python and openpyxl. I have to fill cells of an excel sheet with test runs and the result(passed/failed). This is all i got so far. I am not getting any errors but the sheet is still empty.. Any help would be nice. Thanks in advance.
def create_report(self, root, now):
tests = (
['Discover DTC time', 'failed'],
['Drucksensor_DTC_Startup', 'failed'],
['Drucksensor_DTC_Runtime', 'passed'],
)
wb = xl.Workbook()
ws = wb.active
ws.title = 'ExcelSummaryReport.xlsx'
row = 1
col = 0
for i in range(row, ws.max_row):
for j in range(col, ws.max_col):
ws.cell(row=i + 1, col=j).value = tests[i]
wb.save('ExcelSummaryReport.xlsx')
ws.max_rowandws.max_colreally ought not be used like this. Just loop over your test results andws.append()- Charlie Clark