I am trying to copy an excel file and rename it. For example I have a file HI.xlsx
and I want to copy it and rename it as BYE.xlsx
.
My code to do this is below and when I run it, the file BYE.xlsx
is created, but it is corrupted.
Here is what I am using:
fIn = open(r"HI.xlsx")
fOut = open(r"BYE.xlsx", "w")
No comments:
Post a Comment