PC Review


Reply
Thread Tools Rate Thread

control excel from web page

 
 
C Williams
Guest
Posts: n/a
 
      15th Sep 2004
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
 
Reply With Quote
 
 
 
 
Daniel Chang [MSFT]
Guest
Posts: n/a
 
      16th Sep 2004
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" <(E-Mail Removed)> 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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007: Print Form Control on a full page graph Jeff Microsoft Excel Programming 2 30th Sep 2008 01:58 PM
Should I use Excel or the OWC11.spreadsheet control in a web page? XP Microsoft Excel Programming 0 23rd May 2008 01:15 PM
Control Excel page breaks during sort? =?Utf-8?B?TG9yaSBI?= Microsoft Excel Misc 1 4th Aug 2006 03:29 AM
Re: How do I get a Control Button in Excel to move down the page when. Dave Peterson Microsoft Excel Misc 0 13th Apr 2005 01:05 PM
control excel from web page C Williams Microsoft Dot NET 1 16th Sep 2004 03:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:18 PM.