【问题标题】:Is there a function in python that can download Microsoft Forms excel sheet?python中是否有可以下载Microsoft Forms excel表的功能?
【发布时间】:2020-03-13 15:24:13
【问题描述】:

我使用谷歌浏览器创建了一个 Microsoft Form 调查,我将链接发送给不同的个人以完成调查,现在我想查看已完成调查的个人的所有回复。如何使用 python 直接从 chrome 下载 Microsoft Form excel 表?

代码:

   import selenium
   from selenium import webdriver

   driver = webdriver.Chrome()
   driver.get("Microsoft Form Link")
   button = driver.find_element_by_id('Open in Excel')
   button.click()

但我得到了这个错误:

WebDriverException: Message: 'chrome driver' executable needs to be in PATH. Please see 
https://sites.google.com/a/chromium.org/chromedriver/home

【问题讨论】:

  • 您可以访问您的 azure 租约吗?如果是这样,请尝试并利用 Microsoft Graph API - 此外,您似乎还没有下载 chrome 驱动程序并将其添加到您的路径 driver = webdriver.Chrome(path_to_driver)
  • 您的错误不是关于下载 excel 表,而是关于让 selenium 完全正常工作。在我看来,你应该问一个新的问题

标签: python python-3.x selenium-webdriver


【解决方案1】:

您必须从这里下载与您的 Chrome 浏览器匹配的 chromedriver:https://chromedriver.chromium.org/downloads

那么你必须添加这个:

driver = webdriver.Chrome(executable_path=r'PATH TO THE FILE\chromedriver.exe')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-11-02
    • 1970-01-01
    • 2021-11-20
    • 2018-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-06
    相关资源
    最近更新 更多