Home > other >  Using the python in XLSX template to add a row after the file is damaged, can open, but can't u
Using the python in XLSX template to add a row after the file is damaged, can open, but can't u

Time:12-05


Def edit_template (question, knowledge_base) :
# edit template

Sheet_path="E: \ \ workspace \ upload material import template 1. XLSX"

Workbook=openpyxl. Load_workbook (sheet_path)


The workspace=workbook. Worksheets [0]
Print (workspace)


The workspace. The cell (3, 1, question)
The workspace. The cell (3, 2, "automated test answers")
The workspace. The cell (3, 3, knowledge_base)
Workbook. Save (sheet_path)

Edit_template (" upload test file ", "personality personalized")