如何自动从Excel电子表格中打开多个URL? [英] How to automate opening multiple URLs from an Excel Spreadsheet?

查看:543
本文介绍了如何自动从Excel电子表格中打开多个URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个Excel电子表格,我的客户端提到了很多URL来编辑它们。所以目前我去每个URL并在浏览器中手动打开它。这花费了我很多时间,让我厌倦了一次又一次地做同样的步骤。



有人可以建议我如何从excel自动打开多个URL片。基本上我想要一个脚本自动识别列中的URL并在资源管理器中打开它。



基本上,我不是核心开发人员(我是营销专业人士) ,但这些天开始学习编程)。



所以,请分享一个JavaScript或VBScript来自动化这种过程或指导我如何进行这种自动化,以便我可以更好地学习。





干杯,

Rishu Mehra

Hi Everyone,

I've an Excel spreadsheet where so many URLs are mentioned by my client to edit them. So currently I go the each URL and open it manually in browser. Which takes up lot of my time and makes me sick of doing the same step again and again.

Can someone please suggest me how to automatically open multiple URLs from an excel sheet. Basically I want an script that automatically identify URLs from the column and open it in the explorer.

Basically, I am not a core developer (I'm a marketing professional, but started learning programming these days).

So, please share a JavaScript or VBScript to automate this kind of process Or direct me how to do this kind of automation so I can learn better.


Cheers,
Rishu Mehra

推荐答案

可以这一个对你有帮助吗? 在宏中打开HTML页面(Microsoft Excel) [ ^ ]





执行此操作的宏将显示如下:

Could this one help you? Opening an HTML Page in a Macro (Microsoft Excel)[^]


A macro to do this would appear as follows:
Sub DoBrowse1()
    Dim ie As Object
    Set ie = CreateObject("Internetexplorer.Application")
    ie.Visible = True
    ie.Navigate "c:\temp\MyHTMLfile.htm"
End Sub



此宏将在新的Internet Explorer窗口中打开文件c:\ temp \MyHTMLfile.htm。如果你想打开一个网页...(r)用URL替换文件路径。


嘿,



感谢所有帮助。



获得解决方案。这是脚本:



Hey,

Thanks for all the help.

Got the Solution. Here is the script:

Sub OpenLinks()
    Dim Cell As Range
    Set LinkRng = Range("A1").CurrentRegion.Columns(1)
    On Error Resume Next
    For Each Cell In LinkRng.Cells
        Cell.Hyperlinks(1).Follow
    Next
    On Error GoTo 0
End Sub





但我需要将URL保留在A行中,并且所有URL都应该是超链接的。现在还可以做我的工作。



干杯,

Rishu Mehra



But I need to keep the URLs only in A row and all should Hyperlinked. That still can do my work for now.

Cheers,
Rishu Mehra


这篇关于如何自动从Excel电子表格中打开多个URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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