【问题标题】:It is possible to use selenium in libreoffice calc or Excel?可以在 libreoffice calc 或 Excel 中使用 selenium 吗?
【发布时间】:2021-01-31 16:06:42
【问题描述】:

我需要一个从活动单元格中读取信息并在 google 上搜索的脚本。但我不知道如何在 libreoffice calc 或 Excel 中使用 selenium 和 python 或类似的东西

Selenium 允许我进行谷歌搜索、访问网站、在表单中插入信息。所以我需要脚本来读取活动单元格并进行谷歌搜索。比如:

import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys


driver = webdriver.Chrome(executable_path=r"exec_path")

driver.get('https://www.google.com/')

driver.find_element_by_name("q").send_keys("active cell", Keys.RETURN)

time.sleep(15) 
browser.quit()

但我希望此代码与 excel 或 libreoffice calc 的活动单元格交互,但我不知道如何。

【问题讨论】:

标签: python excel selenium libreoffice-calc


【解决方案1】:

Selenium 能做什么?它可以帮助您解决业务问题的网络相关步骤。您是否正在考虑在线 LibreOffice?如果没有 - Selenium 无法帮助您使用桌面应用程序。

如何从硒开始: https://www.selenium.dev/documentation/en/getting_started/quick/

如何使用 python 与 LibreOffice Calc 文件交互: Using Python to access LibreOffice Calc using Uno

【讨论】:

    猜你喜欢
    • 2015-01-08
    • 2018-04-24
    • 2021-11-12
    • 1970-01-01
    • 1970-01-01
    • 2017-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多