{"id":7684,"library":"robotframework-excellib","title":"Robot Framework Excel Library","description":"Robot Framework library for working with Excel documents, based on `openpyxl`. It provides keywords to allow opening, reading, writing, and saving Excel files within Robot Framework test automation. The current version is 2.0.1, with the latest release on June 18, 2020. The project appears to be in maintenance mode, with no recent development activity beyond the 2020 release.","status":"maintenance","version":"2.0.1","language":"en","source_language":"en","source_url":"https://github.com/peterservice-rnd/robotframework-excellib","tags":["robot framework","excel","automation","openpyxl"],"install":[{"cmd":"pip install robotframework-excellib","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core library for handling .xlsx Excel files, which `robotframework-excellib` is based upon.","package":"openpyxl","optional":false}],"imports":[{"note":"Robot Framework libraries are imported using the 'Library' setting in the *** Settings *** section, not standard Python import statements, and typically by their class name, not the package name.","wrong":"import ExcelLibrary\nLibrary    robotframework-excellib","symbol":"ExcelLibrary","correct":"*** Settings ***\nLibrary    ExcelLibrary"}],"quickstart":{"code":"*** Settings ***\nLibrary    ExcelLibrary\n\n*** Test Cases ***\nCreate And Write Excel Document\n    ${doc_id}=    Create Excel Document    doc_id=MyNewExcel\n    Write Excel Cell    row_num=1    col_num=1    value=Hello\n    Write Excel Cell    row_num=1    col_num=2    value=World\n    Save Excel Document    filename=output.xlsx\n    Close Current Excel Document\n\nRead From Excel Document\n    ${doc_id}=    Open Excel Document    filename=output.xlsx    doc_id=ExistingExcel\n    ${cell_value}=    Read Excel Cell    row_num=1    col_num=1\n    Should Be Equal As Strings    ${cell_value}    Hello\n    Close Current Excel Document","lang":"robotframework","description":"This quickstart demonstrates how to create a new Excel document, write data to cells, save it, and then open an existing document to read its contents using the `robotframework-excellib` keywords."},"warnings":[{"fix":"Review calls to `Open Excel Document` and ensure the `keep_vba` argument is provided, e.g., `Open Excel Document    filename.xlsx    my_doc_id    keep_vba=False`.","message":"The `Open Excel Document` keyword had a breaking change in an unspecified version, adding a new `keep_vba` argument. Scripts using older keyword signatures without this argument may fail after upgrading.","severity":"breaking","affected_versions":"<=2.0.0 (potentially)"},{"fix":"For Python 3 and `.xlsx` files, use `pip install robotframework-excellib`. For Python 2 and `.xls` files, you might need `robotframework-excellibrary` if it's still maintained for those specific requirements.","message":"There are multiple Robot Framework Excel libraries with similar names (`robotframework-excellib` and `robotframework-excellibrary`). `robotframework-excellib` is based on `openpyxl` and supports Python 3 and `.xlsx` files. The older `robotframework-excellibrary` is typically for Python 2 and `xls` files (via `xlutils` and `xlrd`). Ensure you are installing and using the correct library for your Python version and file type.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure all Excel documents are closed using `Close Current Excel Document` or `Close All Excel Documents` after use, especially before attempting to recreate or reopen a document with the same `doc_id`. Use unique `doc_id`s for different documents or within different test cases if they are expected to be open concurrently.","message":"Attempting to create or open an Excel document using an identifier (`doc_id`) that already exists in the library's internal cache will raise a `SuchIdIsExistException`. This often happens when re-running tests or not properly closing documents.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install the library via pip: `pip install robotframework-excellib`.","cause":"The `robotframework-excellib` Python package is not installed or not discoverable by Robot Framework.","error":"Importing test library 'ExcelLibrary' failed: ModuleNotFoundError: No module named 'ExcelLibrary'"},{"fix":"Close the existing document first using `Close Current Excel Document` or `Close All Excel Documents`, or use a unique `doc_id` for the new document.","cause":"You are trying to create a new Excel document with a `doc_id` that is already in use by another open document in the library's cache.","error":"SuchIdIsExistException: Document with such id 'my_doc_id' is created."},{"fix":"Close the Excel file in any other application before executing the Robot Framework test. Verify and adjust file system permissions if necessary.","cause":"The Excel file you are trying to save or modify is currently open by another application (e.g., Microsoft Excel, LibreOffice Calc) or your user account lacks write permissions to the file or directory.","error":"IOError: [Errno 13] Permission denied: '/path/to/your/file.xlsx'"},{"fix":"Double-check the exact spelling and case of the sheet name. Ensure the Excel document you are working with actually contains the specified sheet. Use keywords like `Get Sheet Names` to list available sheets.","cause":"You are attempting to access an Excel sheet by a name that does not exist in the currently opened workbook, or the workbook might be empty/corrupted.","error":"XLRDError: No sheet named '<sheet_name>' in robotframework-excellib"}]}