import openpyxl as opy
book = opy.Workbook()
sheet1 = book.active
sheet1.title
sheet1.title = 'mysheet_1'
book.save('make_excel.xlsx')
my_made = opy.load_workbook('make_excel.xlsx')
sheet2 = my_made.active
table = my_made[sheet2.title]
table['A1'] = 'How is the weather today'
from openpyxl.styles import Font
table['A1'].font = Font(bold=True,italic=True,size=28)
Bis zu 3.4, um dox mit pip install anzugeben Geben Sie danach den Paketnamen mit python-docx an.
import docx
doc = docx.Document()
doc.add_paragraph('How is the weather today')
doc.add_paragraph()
doc.add_paragraph(today_list)
doc.add_paragraph()
doc.add_picture('pict.png')
doc.save('make_word_today.doc')
Recommended Posts