Want to share a script? Click here to contribute! Author: Tim Ackermann Platform: Windows NT, Windows 2000, Windows XP Type: VBScript Use this small snippet of VBScript to automatically open a spreadsheet into Excel from Internet Explorer, instead of having it open directly in Internet Explorer. I’ve been reading online about scripting for a while. […]
Datamation content and product recommendations are
editorially independent. We may make money when you click on links
to our partners.
Learn More
Want to share a script? Click here to contribute!
Author: Tim Ackermann
Platform: Windows NT, Windows 2000, Windows XP
Type: VBScript
Use this small snippet of VBScript to automatically open a spreadsheet into Excel from Internet Explorer, instead of having it open directly in Internet Explorer. I’ve been reading online about scripting for a while. Recently I had a client request a simple thing from me.
Problem: Figure out a way to open an Excel spreadsheet in Microsoft Excel from a Web page instead of it opening in Internet Explorer.
After about two hours of searching, I found something at Microsoft that showed me how to complete this with VBScript.
Download the script.
Scroll down to view the script.
How to open a spreadsheet into Excel from Internet Explorer.
============================================================
I'm including two files with this readme: Excel_Test.htm and test.xls
Excel Test.htm is a working test webpage.
Copy test.xls to c:temp
Double-click on Excel_Test.htm
============================================================
Adapted from Microsoft Knowledge Base Article:
http://support.microsoft.com/support/kb/articles/Q178/2/22.ASP
============================================================
1. Add the following to the webpage in the section:
Dim objExcel
Sub Btn1_onclick()
call OpenWorkbook("http://www.microsoft.com/subdirectory/test.xls")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
End Sub
============================================================
2. Then add the following to the webpage in the section:
============================================================
3. Insert the correct path to the Excel file.
============================================================
NOTE: You don't have to use a url in the above example:
Ex: OpenWorkbook("serversharefolderfile.xls")
Ex: OpenWorkbook("g:folderfile.xls")
NOTE2: You can change "Open Excel File" to anything you want:
Ex: VALUE="Click Here to open my spreadsheet"
Disclaimer: We hope that the information in these pages is valuable to you. Your use of the information contained in these pages, however, is at your sole risk. All information on these pages is provided “as -is”, without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by me. I shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
-
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
-
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
-
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
-
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
-
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
-
Top 10 AIOps Companies
FEATURE | By Samuel Greengard,
November 05, 2020
-
What is Text Analysis?
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
-
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
-
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
-
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
-
Top 10 Chatbot Platforms
FEATURE | By Cynthia Harvey,
October 07, 2020
-
Finding a Career Path in AI
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
-
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
-
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
-
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
-
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
-
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
-
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
-
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
-
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020
SEE ALL
APPLICATIONS ARTICLES