Quality Testing

Quality is delighting customers

Please suggest which is the best library that can be used with Python to fetch test data from Excel sheets?

Which is the best library that can be used with Python to fetch test data from Excel sheets?

Views: 19

Reply to This

Replies to This Discussion

According to software testing company, the best library to fetch data from Excel sheets using Python is openpyxl. It is relatively easy to learn and simple to use.
Using openpyxl, we can easily fetch/write data to/from excel sheets having formats like xlsx/xlsm/xltx/xltm.

Below is the sample code to deal with test cases stored in excel sheets using openpyxl.

###################################
from openpyxl import Workbook
wb = Workbook()

# grab the active worksheet
ws = wb.active

# Data can be assigned directly to cells
ws['A1'] = 42

# Rows can also be appended
ws.append([1, 2, 3])

# Python types will automatically be converted
import datetime
ws['A2'] = datetime.datetime.now()

# Save the file
wb.save("sample.xlsx")
###################################

Hello,

I hope you are doing well...

Please read the complete article here, It will be helpful to you:  Selenium Automation Testing Using Python

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service