python - Robot Framework with Excel Library erroring: "local variable 'my_sheet_index' referenced before assignment" -


i have issue excellibrary proof of concept. when try save data new excel file returns error unboundlocalerror: local variable 'my_sheet_index' referenced before assignment on put number cell sheetname=${mysheetname} column=1 row=1 value=90

do know can prevent getting please? here easy test file:

*** 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 cell   sheetname=${mysheetname}    column=1    row=1    value=90     save excel current directory    filename=mynewexcel.xls 

*** settings *** library             excellibrary  *** variables *** ${path}   c:\\python27\\excelrobottest\\ ${name}    test.xls  *** test cases *** excel test     create  *** keywords *** create     create excel workbook    ${name}     open excel    ${path}${name}     put string cell    ${name}    1    1    90     save excel        ${path}${name} 

this gets around first error

unboundlocalerror: local variable 'my_sheet_index' referenced before assignment

i used put number cell , caused a

indexerror: list index out of range

so used put string cell , causes a

ioerror: [errno 13] permission denied: u'c:\python27\excelrobottest\test.xls'

so think current code i've posted best shot work computer funny policies stopping me saving / changing files through robot... stumped :( ill update more if manage around issue.

considering it's complaining perms - must have done writing cant save.

edit1: after switching policy it's throwing a

ioerror: [errno 22] invalid mode ('w+b') or filename: u'c:\python27\excelrobottest\test.xls'

i have no idea is...


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -