使用VBA从IE下载文件 [英] Download File from IE with VBA

查看:123
本文介绍了使用VBA从IE下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我在excel中创建了一个VBA宏,指向使用InternetExplorer对象的网页。从这里我想点击一个下载.csv文件的按钮。现在单击该按钮会导致信息栏由于安全设置而弹出。看来该按钮后面有一个实际创建.csv文件的java脚本,但是IE阻止了我的访问。我希望能够执行以下操作之一来解决这个问题,但不知道如何解决这个问题:1)找出如何以编程方式禁用信息栏(可能暂时更改安全设置,或者告诉信息栏以允许访问)2。)尝试模仿右键单击按钮并使用"目标另存为"做法。有谁知道如何去做?如果这是在错误的论坛,请告诉我。谢谢!

Hello, I've created a VBA macro within excel that points to a webpage using the InternetExplorer object. From here I wish to click on a button that will download a .csv file. Right now clicking on the button causes the information bar to popup due to the security settings. It appears that the button has a java script behind the scenes that actually creates the .csv file, but IE is blocking my access. I'm hoping to do one of the following to get around this but don't know how to go about it: 1.) Figure out how to disable the information bar programatically (perhaps by changing the security settings temporarily, or by telling the info bar to allow access) 2.) Try to mimic right clicking the button and use a "Save Target As" approach. Does anyone know how to go about this? If this is in the wrong forum please let me know. Thanks!

推荐答案

我想知道页面的URL。
I'd like to know the URL of the page.


这篇关于使用VBA从IE下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆