robot framework 操作Excel需要安装库 ExcelLibrary

pip install robotframework-ExcelLibrary

将ExcelLibrary 导入到robot framework中

Robot Framework:Excel操作

使用例子:

Robot Framework:Excel操作

 

遇到问题:

 FAIL : NotImplementedError: formatting_info=True not yet implemented   原因是因为 xlrd只能操作.xls格式,文件直接改后缀名会报错,需要重新保存为.xls文件

Robot Framework:Excel操作

FAIL : UnboundLocalError: local variable 'cellValue' referenced before assignment  原因是操作错误 使用2 无法读取excel行列值,应使用A1、A2、B1、B2... 

相关文章: