Hello,
I have a .xlsx file with 11 worksheets and I need to insert the contents of a text file (tab delim, roughly 30 columns with 1000 rows) from Row 3 onwards on the 2nd sheet. I have my code which can insert values into existing sheet but I am unable to write/import the contents of a text file. Also, is there a way to maintain the font/images/color of the original xlsx file in the new saved file ?
#!/usr/bin/env python
from openpyxl.reader.excel import load_workbook
wb=load_workbook(r'excel.xlsx')
ws=wb.get_sheet_by_name('Sheet2')
ws.cell('A3').value = 'new value'
wb.save(r'S12a.xlsx')
thank you