【问题标题】:Robot Framework- How to read particular cell data in xlsx fileRobot Framework-如何读取 xlsx 文件中的特定单元格数据
【发布时间】:2018-08-15 14:09:33
【问题描述】:

我是 Python 和机器人框架的新手,想读取特定的单元格数据以实现自动化。我使用了`Library ExcelLibrary 并使用了一个命令

 Read Cell Data By Coordinates    {Path to excel file}/test.xlsx    1    1 

但出现错误消息,即

FAIL : AttributeError: 'NoneType' object has no attribute 'index'

在骑行机器人框架中使用它。如果需要任何其他信息,请告诉我。

【问题讨论】:

标签: selenium automation robotframework


【解决方案1】:

如果你想从你的 xls 文件中读取数据,你可以使用下面的代码。

${data}    Read Cell Data By Name    Sheet1    A1

${data}  Read Cell Data By Coordinates   Sheet1    1   1

使用列和行从该单元格返回数据。

参数:

Sheet Name (string) 单元格值所在的选定工作表 从返回。 Column (int) 单元格的列整数值 值将从中返回。 Row (int) 行整数值 单元格值将从中返回。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-07
    • 2016-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-30
    • 2018-02-06
    相关资源
    最近更新 更多