import openpyxl
def factuur():
wb = openpyxl.load_workbook(\'factuurvoorbeeld1.xlsx\')
Blad1 = wb.active
Blad1[\'K7\'] = \'logo.png\'
Blad1[\'E22\']
I had the same issue and tried a lot of libs. For me editpyxl does exactly what I need in that scenario:
import editpyxl
wb = editpyxl.Workbook()
source_filename = r'Template.xlsx'
destination_filename = 'Output.xlsx'
wb.open(source_filename)
ws = wb.active
ws.cell('A1').value = 3.14
wb.save(destination_filename)
wb.close()