1)For循环中条件不成立继续循环,条件成立退出:
可以使用Continue For Loop If和Exit For Loop If组合起来使用
FOR ${excelfilename} IN @{ExcelfileNAMES}
Continue For Loop If '${filename}' not in '${excelfilename}'
${existfilern_old} run keyword if '${filename}' in '${excelfilename}' readtextcell ${excelpath} ${Finaldata} ${excelfilename}
log ${existfilern_old}
Exit For Loop If '${filename}' in '${excelfilename}'
END
2)run keyword if把面不能给变量赋值但是要吧把要赋值的变更放在run keyword if前面,条件为真和为伟赋值不同
${existfilern_new} run keyword if ${lentexistfilern}==0 Create List A ${${lastelementcell}[1]+${15}}
... ELSE Set Variable ${existfilern_old}