Skip to content

wanmi59/robotframework-excellibrary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

robotframework-excellibrary for Robot Framework

Introduction

Robotframework-excellibrary is a Robot Framework Library that provides keywords to allow opening, reading, writing and saving Excel files (xls). The robotframework-excellibrary leverages two other python libraries xlutils and natsort. Xlutils installs xlrd that reads data from an Excel file and xlwt write to an Excel file.

  • Information about robotframework-excellibrary keywords can be found on the ExcelLibrary-Keyword Documentation page.
  • Information about working with Excel files in Python can be found on the Python Excel page.
  • Useful pdf for practical use with Excel files here.

Requirements

  • Python 3.7.x (Newer versions not tested)

Installation

Using pip

The recommended installation tool is pip.

Install pip. Enter the following:

pip install robotframework-excellibrary

Append --upgrade to update both the library and all its dependencies to the latest version:

pip install --upgrade robotframework-excellibrary

To install a specific version enter:

pip install robotframework-excellibrary==(DesiredVersion)

Manual Installation

To install robotframework-excellibrary manually, install all dependency libraries before installing robotframework-excellibrary.

  1. Download source distributions (*.tar.gz) from here.

  2. Open command line:

    pip install <tar.gz path>

Uninstall

To uninstall robotframework-excellibrary use the following pip command:

pip uninstall robotframework-excellibrary

Directory Layout

ExcelLibrary/ExcelLibrary.py :
The Robot Python Library that makes use of the xlutils and natsort.
Tests/acceptance/ExcelRobotTest.robot :
Example test file to display what various keywords from robotframework-excellibrary accomplish
doc/ExcelLibrary-KeywordDocumentation.html :
Keyword documentation for the robotframework-excellibrary.

Usage

To write tests with Robot Framework and robotframework-excellibrary, ExcelLibrary must be imported into your Robot test suite. See doc/ExcelLibrary-KeywordDocumentation.html for more information.

Running the Demo

The test file ExcelRobotTest.robot, is an easily executable test for Robot Framework using robotframework-excellibrary. For in depth detail on how the keywords function, read the Keyword documentation.

To run the test, open a command prompt within the Tests/acceptance folder and run:

robot ExcelRobotTest.robot

Things to Note When Using robotframework-excellibrary

  • 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. They must add a sheet then save the workbook before using any other keyword. If they want to use any other keywords on the workbbok they must open the workbook again to do so.
  • We cannot use xlsx files as this has not been implemented in the xlrd library. To get round this issue, consider using robotframework-excellib.

Getting Help

The user group for Robot Framework is the best place to get help. Include in the post:

  • Contact the Python-Excel google group
  • Full description of what you are trying to do and expected outcome
  • Version number of robotframework-excellibrary and Robot Framework
  • Traceback or other debug output containing error information

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 92.9%
  • RobotFramework 7.1%