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}