如何在 selenium 中打开下载的 excel 文件
How to open a downloaded excel file in selenium
谁能帮我解决以下问题?
单击下载文件后,它已成功下载,但我无法打开文件。
任何人都可以建议我如何打开为 Mac
下载的文件
您没有 post 任何示例代码,但无论如何,请查看这个通用示例。
import requests
url = "https://www.nordpoolgroup.com/Market-data1/Power-system-data/Production1/Wind-Power-Prognosis/DK/Hourly/?view=table"
r = requests.post(url) #POST Request
with open('data_123.xls', 'wb') as f:
f.write(r.content)
# file goes here, by default, if WD is not changed to somewhere else:
# C:\Users\your_path_here\
谁能帮我解决以下问题?
单击下载文件后,它已成功下载,但我无法打开文件。
任何人都可以建议我如何打开为 Mac
下载的文件您没有 post 任何示例代码,但无论如何,请查看这个通用示例。
import requests
url = "https://www.nordpoolgroup.com/Market-data1/Power-system-data/Production1/Wind-Power-Prognosis/DK/Hourly/?view=table"
r = requests.post(url) #POST Request
with open('data_123.xls', 'wb') as f:
f.write(r.content)
# file goes here, by default, if WD is not changed to somewhere else:
# C:\Users\your_path_here\