It's easy, but it's the code for manipulating files. I think it's the recognition of creating directory files and managing front-end and back-end files. Is it right? The execution environment is Pycharm I'm using a Macbook pro 13 2020.
import string
with open('directly_folder/sample.html') as f: #sample.Also possible with txt
t = string.Template(f.read())
contents = t.substitute(name='your nickname',contents='favorite phase?')
print(contents)
The code below shows the location and contents of the file.
py -m pip openpyxl //For windows Command prompt
pip openpyxl //Check if it is installed in the terminal
pip openpyxl--upgrade pip//Update
import os
import sys
import openpyxl
wb = openpyxl.load_workbook(path)
ws = wb["Sheet1"]
ws["A1"].value = "X"
wb.save(path)
Is the file output to an Excel sheet? With Jupyter notebook, it's possible. https://gammasoft.jp/support/pip-install-error/ This is a reference link.
Recommended Posts