I want to close an excel file after opening it. I searched this site but I cannot get a solution. Can anyone help?
import os
#TODO: close the file 'myexcel.xlsx' before writing
#writing data to 'myexcel.xlsx' here
a = os.startfile('myexcel.xlsx')#open the file for reading
Thank you very much.