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')
Смотрите видео read and write to excel in python (xlrd and openpyxl) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Ahmed Hekal 24 Декабрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 5,073 раз и оно понравилось 36 людям.