(一)、説了这么多很抱歉,工作内容关系没有源代码分享,但是excel的操作可以分享给大家,相信大家一看就知,当然我只是菜鸟,有不当言语之处希望见谅,可留言指出让我改正,谢谢;
(二)、分享代码部分:
excel
Open Excel C:\\excel1.xls
#读取列数
@{listcol} Get Column Values Sheet1 2
Log Many @{listcol}
#读取行数
@{listrow} Get Row Values Sheet1 0
log Many @{listrow}
#获取列数总计
${colnum} Get Column Count Sheet1
log ${colnum}
#获取行数总计
${rownum} Get Row Count Sheet1
log ${rownum}
#根据行列坐标获取excel的值
${zuobiaovalue} Read Cell Data By Coordinates Sheet1 2 1
log ${zuobiaovalue}
#根据列坐标读取值
${colvalue} Read Cell Data By Name Sheet1 C2
log ${colvalue}
#for循环取值
: FOR ${row} IN RANGE ${rownum}
\ ${name} Read Cell Data By Coordinates Sheet1 0 ${row}
\ log ${name}
\ ${psw} Read Cell Data By Coordinates Sheet1 1 ${row}
\ log ${psw}
\ ${result} Read Cell Data By Coordinates Sheet1 2 ${row}
\ log ${result}
\ ${sheetvalues} Create Dictionary username=${name} passwd=${psw} result=${result}
\ log ${sheetvalues}
————————————————
版权声明:本文为CSDN博主「鸽子董」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/DCclient/article/details/82975414
来源:https://www.cnblogs.com/zxc01/p/12637442.html