简体   繁体   English

Excel Web查询:无法将用户名和密码传递给Windows安全登录

[英]Excel Web query: Unable to pass username and password to Windows security Login

I am trying to automate few web queries for my company's website. 我正在尝试为我公司的网站自动化一些Web查询。

The website is password secured and everytime the excel is opened, it asks for the UID and pwd via the windows security pop-up. 该网站具有密码保护,每次打开excel时,它都会通过Windows安全性弹出窗口要求提供UID和密码。

Is there a way to pass the credentials to windows security login via VBA. 有没有一种方法可以通过VBA将凭据传递给Windows安全登录。

PS: I tried to open a web browser, connect to it and then run the PS:我试图打开一个网络浏览器,连接到它,然后运行

ActiveSheet.QueryTables.add(Connection:=connstring, Destination:=Range("B2"))

with required query parameters. 带有必需的查询参数。 It is not helping. 它没有帮助。

The windows security login box still pops up. Windows安全性登录框仍然弹出。

Hi all thanks for trying to help. 大家好,谢谢您的帮助。 I realized. 我意识到。 it is tricky to automate the Login via Excel Web queries. 通过Excel Web查询自动执行登录非常困难。 Alternatively, I tried using Python to scrape data from the site, it was easy and it worked. 另外,我尝试使用Python从站点中抓取数据,这很容易并且有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM