我的ExcelLibrary概念证明有问题。当我试图将一些数据保存到新的Excel文件中时,它在Put Number To Cell sheetname=${mySheetName} column=1 row=1 value=90
上返回一个错误UnboundLocalError: local variable 'my_sheet_index' referenced before assignment
你知道我能做些什么来阻止我得到那个吗?这是我的简易测试文件:
*** Settings ***
Library ExcelLibrary
Library Collections
*** Variables ***
${Excel_File_Path} C:\\Python27\\ExcelRobotTest\\
${mySheetName} UserImport
*** Test Cases ***
Excel Test
Lubos Test
*** Keywords ***
Lubos Test
Create Excel Workbook newsheetname=${mySheetName}
Put Number To Cell sheetname=${mySheetName} column=1 row=1 value=90
Save Excel Current Directory filename=MyNewExcel.xls
这样可以避免你的第一个错误
我使用了
Put Number To Cell
,这导致了所以我使用了
Put String To Cell
,这会导致所以我认为我发布的当前代码是你作为我的工作电脑的最佳选择,因为一些有趣的政策阻止我通过机器人保存/更改文件。。。但我真的很为难:(如果我设法避开这个问题,我会更新更多的信息。在
考虑到它在抱怨烫发——它一定是写完了,但却不能存钱。在
编辑1:在迅速改变政策后,它现在正在抛出一个
我不知道这是什么。。。在
相关问题 更多 >
编程相关推荐