473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

control excel from web page

Hi,

I would like to build a small feature on a web page. I would like for a
user to be able to enter the path of an Excel file into a field and then
click a button that will open the file and allow further manipulation of
it, both manually by the user and controlled by code. Unfortunately, I
have never programmed anything for the web and am not sure where to
start...I have plenty of experience interacting with excel from vb code,
however, and will be using vb.net. Where is a good place to start?

Thanks in advance for you help. Please direct me if you think there
would be a better newsgroup to post this.

-Casey
Jul 21 '05 #1
1 1253
Hello Casey,

The following code will get you started:

<html>
<head>
<title>Open Excel Workbook</title>
<script language="vbscript">
Sub openExcel
Dim xlApp
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open document.all("wbkFilePath").value
End Sub
</script>
</head>
<body>
<form>
<input id="wbkFilePath" type="text"><input type="button"
value="Open Excel" onclick="openExcel">
</form>
</body>
</html>

You can then interact with Excel via its object model.

Note 1: Excel has to be present on the user's machine.
Note 2: For the script to work, the user's Internet Explorer security
settings will have to be relaxed a bit. "Initialize and script ActiveX
controls not marked as safe" has to be set to "Prompt" in the appropriate
zone.

Hope this helps,

-Daniel

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"C Williams" <no****@thank.you> wrote in message
news:uHO1d.8265$W73.3939@trndny03...
Hi,

I would like to build a small feature on a web page. I would like for a
user to be able to enter the path of an Excel file into a field and then
click a button that will open the file and allow further manipulation of
it, both manually by the user and controlled by code. Unfortunately, I
have never programmed anything for the web and am not sure where to
start...I have plenty of experience interacting with excel from vb code,
however, and will be using vb.net. Where is a good place to start?

Thanks in advance for you help. Please direct me if you think there would
be a better newsgroup to post this.

-Casey

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Newbee | last post by:
Hi, I would like to have form with Tab Control with 3 pages. Each page in tab control would contain text boxes from different sources (tables). On first page would be text boxes from tblOne,...
9
by: ASP .NET Newbie | last post by:
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the WebBrowser (AxWebBrowser)? Thanks, Chad
0
by: Mortar | last post by:
i am dynamically creating controls when i do a server side export to an excel file. I can only get it to work if I have no <% %> anywhere in my html. i.e. i am writing out session name to the...
2
by: George | last post by:
Is there a fast way to transfer an Excel range to an array? Example: Excel range is E2:E300 Dim person() as string Thanks, George
1
by: C Williams | last post by:
Hi, I would like to build a small feature on a web page. I would like for a user to be able to enter the path of an Excel file into a field and then click a button that will open the file and...
5
by: John Kotuby | last post by:
Hi all, This is my first time trying to creaet and use a custome Web Control in a Web Site project in ASP.NET 2.0 with VS 2005 and VB. I created the control in a separate Web Control Library...
0
by: harini | last post by:
Hi, I am working on excel VBA and i have a control on my excel sheet say a command button. Now when i click on the command button i shud be able to generate a state web page written using html...
6
by: Aussie Rules | last post by:
Hi, I am looking for a grid (winform) that I can use in my application that can do the following... Cell Calculation.. Like excel does (=sum(cell1 + cell2)) and other basic calculations ...
5
by: charli | last post by:
I have a userform in Access/Excel with a Multipage control on. At the bottom of each multipage is a command button that sends you to the next page. When you click these command buttons, it changes...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.