Q: Saving data to the same xls file with Robot Framework ExcelLibrary Is it possible to read data (Sheet1) and write data (Sheet2) to the same xls file with Robot Framework? Here's my code. Error is on the final line.
*** Settings ***
Library  Collections
Library  ExcelLibrary

*** Test Cases ***
Write Results to Excel
    Open Excel  ${Excel_File_Path}${Excel_File_Name}

    # Check to see if the Results sheet exists before creating:
    ${sheetNames} =  Get Sheet Names
    ${SheetChk} =  Evaluate  ${EXCEL_RESULTS_SHEET}  in  ${sheetNames}
    Run keyword If  "${SheetChk}" == "False"
    ...  Add New Sheet   ${EXCEL_RESULTS_SHEET}

    # Write the data
    Put String To Cell  ${EXCEL_RESULTS_SHEET}  ${ColNum}  ${RowNum}  ${ResultsDataVal}

    # Save the data
    Save Excel  ${Excel_File_Path}${Excel_File_Name}
    # Getting error: ValueError: dictionary update sequence element #0 has length 8; 2 is required


A: The library's documentation explicitly states not to do any other opeartions before or after adding a sheet. From its "Things to Note When Using robotframework-excellibrary" section:

When using the keyword Add New Sheet the user cannot perform any functions before or after this keyword on the currently open workbook. The changes that other keywords make will not be saved when the keyword Add New Sheet is used.

So in that Run Keyword If fragment, you have to also save the file, and re-load it.
