完美解決
excelFile = './filename.xls'
excelApart = MIMEApplication(open(excelFile, 'rb').read())
excelApart.add_header('Content-Disposition', 'attachment', filename = Header('filename.xls','UTF-8').encode())
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/133987.html
