import base64


with open("c:\\temp\\test.xls", "rb") as file:
    file_content = base64.b64encode(file.read()).decode()

with open("c:\\temp\\test22.xls", "wb") as file:
    file.write(base64.b64decode(file_content.encode()))

