How to automate your work and read and write to excel files using python language. using xlrd and openpyxl libraries. (with English captions)
#python #openpyxl #xlrd #jupyeter #notebook
-------------------------------------------------------------------------------
The code :
import xlrd
from openpyxl import load_workbook
wb = xlrd.open_workbook ('Sample-Superstore-Subset-Excel.xlsx')
sheet1 = wb.sheet_by_index (0)
var1 = sheet1.cell_value (4, 1)
print (var1)
wb2 = load_workbook ('Sample-Superstore-Subset-Excel.xlsx')
sheets = wb2.sheetnames
Sheet1 = wb2 [sheets[1]]
Sheet1.cell(row = 2 , column = 3).value = 'Hello friends'
wb2.save ('output.xlsx')
Watch video read and write to excel in python (xlrd and openpyxl) online without registration, duration hours minute second in high quality. This video was added by user Ahmed Hekal 24 December 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,073 once and liked it 36 people.