我有一个下面的代码,只要条件失败,该代码都会在同一行的第8列中写入一些错误。我有3个if条件,并且所有条件都在第8列中写了一个不同的错误。问题是每个sheet.cell(row = i, column = 8).value
语句都覆盖了先前的错误。如何将错误附加在同一单元格中?
if math_value_of_aufloesung_in_A2L == math_value_of_aufloesung_in_Excel:
sheet.cell(row = i, column = 3).fill = reportParameters.fillCellColor(reportParameters.colorforMatch)
else:
sheet.cell(row = i, column = 8).value = reportParameters.errorType5
bewertung=1
if math_value_of_min_wert_in_A2L == math_value_of_min_wert_in_Excel:
sheet.cell(row = i, column = 5).fill = reportParameters.fillCellColor(reportParameters.colorforMatch)
else:
sheet.cell(row = i, column = 8).value = reportParameters.errorType6
bewertung=1
if math_value_of_max_wert_in_A2L == math_value_of_max_wert_in_Excel:
sheet.cell(row = i, column = 7).fill = reportParameters.fillCellColor(reportParameters.colorforMatch)
else:
sheet.cell(row = i, column = 8).value = reportParameters.errorType7
bewertung=1