如何使用vba excel在网页上获得href值? [英] How to get on a href value on web page using vba excel ?

查看:117
本文介绍了如何使用vba excel在网页上获得href值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是excel vba编程的新手。我一直在尝试使用excel vba在网页上获得href值近2天。请帮帮我。由于我是新手,我可能犯了很多错误。请原谅我。方案是:html designi之后的特定网页想要获得像 www.abc.com www.xyz这样的hef值.com www.ybx.com

I am new to excel vba programing. I have been trying to get href value on a web page using excel vba from almost 2 days now. Please help me out. Since I am new to this I might have made a lot of blunders. Pardon me for that.The scenario is : A particular web page following html designi want to get hef value like www.abc.com, www.xyz.com, www.ybx.com

<div>
   <span class="One">
   <a href="www.abc.com"> subhash </a>
   </span>
   </div>
   <div>enter code here`
   <div>
   <span class="One">
   <a href="www.xyz.com"> mandar</a>
   </span>
   </div>
   <div>
   <span class="One">
   <a href="www.ybx.com"> Onkar</a>
   </span>
   </div>

推荐答案

我建​​议使用正则表达式适当的网站地址模式(网址) [ ^ ]。



看看这里: Excel VBA的简单正则表达式教程 [ ^ ]

VBA中的正则表达式 [ ^ ]

如何在Microsoft Visual Basic 6.0中使用正则表达式 [ ^ ]

正则表达式对象模型 [ ^ ]
I suggest to use Regex with proper pattern for site address (url)[^].

Have a look here: Simple Regular Expression Tutorial for Excel VBA[^]
Regular Expressions in VBA[^]
How To Use Regular Expressions in Microsoft Visual Basic 6.0[^]
The Regular Expression Object Model[^]


这篇关于如何使用vba excel在网页上获得href值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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