Skip to main content

Robotframework library for excel xlsx file format

Project description

Robotframework-excelutil library

This Robotframework Excel Util library provides Robot keywords to Open, Read, Write and Save XLSX files. This library uses python to read and write datas in xlsx files.

Pre-requisities

  • Python - 3.x (Not tested with Python 2.x)
  • Robotframework - 4.x (Not tested with other versions)
  • Openpyxl

Installation

pip install robotframework-excelutil

Settings

| Library ExcelUtil |

To open Excel

| Open Excel | C:\Data\ExcelTest.xlsx |

To open Excel using relative path. I.e., relative to project folder

| Open Excel From Relative Path | ../../Data/data.xlsx |

To open Excel sitting in project folder

| Open Excel From Project Directory | data.xlsx |

To get sheet names of the workbook

  • | Open Excel | C:\Data\ExcelTest.xlsx |
  • | Get sheet names |

To get the column count of the given sheet

  • | Open Excel | C:\Data\ExcelTest.xlsx |
  • | Get Column count | Sheet1 |

To get the row count of the given sheet

  • | Open Excel | C:\Data\ExcelTest.xlsx |
  • | Get Row count | Sheet1 |

To get the sheet count of the given sheet

  • | Open Excel | C:\Data\ExcelTest.xlsx |
  • | Get Sheet count |

To get sheetnames of the workbook

  • | Open Excel | C:\Data\ExcelTest.xlsx |
  • | Get sheet names |

To get the value of a cell by giving the sheetname, row value & column value

  • | Read Cell Data By Coordinates | SheetName | Row Number | Column Number |
  • | Read Cell Data By Coordinates | Sheet1 | 1 | 1 |
  • To pass integer arguments
  • | Read Cell Data By Coordinates | Sheet1 | ${1} | ${3} |

To get the values of all cells in all rows for given sheetname

  • | Get All Rows Data | SheetName |
  • | Get All Rows Data | Sheet1 |

To Write the value to a call using its co-ordinates

  • | Write Data By Coordinates | SheetName | Row Number | Column Number | Data |
  • | Write Data By Coordinates | Sheet1 | 1 | 1 | TestData |

To Save the excel file after writing the data.

  • Update existing file:
  • | Openexcel File | C:\Data\ExcelTest.xlsx |
  • | Save Excelfile | C:\Data\ExcelTest.xlsx |

Save in new file:

  • | Openexcel File | C:\Data\ExcelTest.xlsx |
  • | Save Excelfile | D:\Data\ExcelRobotNewFile.xlsx |

To add a new sheet

| Add new sheet | SheetName

License

© 2021 Nagesh B Nagaraja Rao ( Email: nagesh.nagaraja@gmail.com )

This repository is licensed under the MIT license. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-excelutil-9.12.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_excelutil-9.12-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file robotframework-excelutil-9.12.tar.gz.

File metadata

  • Download URL: robotframework-excelutil-9.12.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for robotframework-excelutil-9.12.tar.gz
Algorithm Hash digest
SHA256 d1ba6d1338d30ea85de37b6cb3cc6807e5ea62e8aa23d122428ccd2fcb5d2317
MD5 46a3b9e760ce42432bd465bad08a152a
BLAKE2b-256 739844e79e1f006ac5e60f96cf00de35503e46f1d3c294dc20fdef4d63e20d2a

See more details on using hashes here.

File details

Details for the file robotframework_excelutil-9.12-py3-none-any.whl.

File metadata

  • Download URL: robotframework_excelutil-9.12-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for robotframework_excelutil-9.12-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2ed7b44cc9f571eb040b6107e48d00125afe7f9e02cff1b813c7d7e2e114ed
MD5 7f78653cc06ae5bc08154855d3ad0bed
BLAKE2b-256 41e30d2745f3dc0a78576330d1966c95d7b5419d1c3acd459bf5555065e8be7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page