使用 Excel-VBA 获取 HTML 源代码 [英] Getting HTML Source with Excel-VBA

查看:56
本文介绍了使用 Excel-VBA 获取 HTML 源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将一个 excel VBA 表单定向到某些 URL,获取 HTML 源并将该资源存储在一个字符串中.这可能吗,如果可以,我该怎么做?

I would like to direct an excel VBA form to certain URLs, get the HTML source and store that resource in a string. Is this possible, and if so, how do I do it?

推荐答案

只是对上述响应的补充.问题是如何获取所述答案实际上并未提供的 HTML 源代码.

Just an addition to the above response. The question was how to get the HTML source which the stated answer does not actually provide.

在浏览器中将 oXMLHTTP.responseText 的内容与 URLhttp://finance.yahoo.com/q/op?s=T+Options"的源代码进行比较.它们不匹配,甚至返回的值也不同.(这应该在下班后执行,以避免交易日发生变化.)

Compare the contents of oXMLHTTP.responseText with the source code in a browser for URL "http://finance.yahoo.com/q/op?s=T+Options". They do not match and even the returned values are different. (This should be executed after hours to avoid changes during the trading day.)

如果我找到执行此任务的方法,将发布基本代码.

If I find a way to perform this task the basic code will be posted.

这篇关于使用 Excel-VBA 获取 HTML 源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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