J
John Eiford
I have started a new web application project with the intention of using the
OWC11 spreadsheet component only to discover that VS2005 and OWC11 don't play
nice.
My imediate goal is just have a button to put text into the spreadsheet
using ASP.NET 2.0 Is this possible?
I added the spreadsheet object, two buttons, and a textbox.
The button should put the contents of the textbox into cell A1 of the
spreadsheet but the project will not compile because of an error about the
object clsid. Can anyone shed some light on this problem? Error, and all
code is below.
Error 1 Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). C:\Documents and Settings\jhopping\My
Documents\Visual Studio 2005\WebSites\WebSite5\Default.aspx 31
The aspx file:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<object id="myOWC" runat="server"
classid="CLSID:0002E559-0000-0000-C000-000000000046" style="width:
760px; height: 424px">
</object>
<br /><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
</form>
</body>
</html>
The aspx.vb file:
Partial Class _Default
Inherits System.Web.UI.Page
Private myOWC As Microsoft.Office.Interop.Owc11.Spreadsheet
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
myOWC.ActiveSheet.Cells(1, 1) = TextBox1.Text
End Sub
End Class
OWC11 spreadsheet component only to discover that VS2005 and OWC11 don't play
nice.
My imediate goal is just have a button to put text into the spreadsheet
using ASP.NET 2.0 Is this possible?
I added the spreadsheet object, two buttons, and a textbox.
The button should put the contents of the textbox into cell A1 of the
spreadsheet but the project will not compile because of an error about the
object clsid. Can anyone shed some light on this problem? Error, and all
code is below.
Error 1 Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). C:\Documents and Settings\jhopping\My
Documents\Visual Studio 2005\WebSites\WebSite5\Default.aspx 31
The aspx file:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<object id="myOWC" runat="server"
classid="CLSID:0002E559-0000-0000-C000-000000000046" style="width:
760px; height: 424px">
</object>
<br /><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
</form>
</body>
</html>
The aspx.vb file:
Partial Class _Default
Inherits System.Web.UI.Page
Private myOWC As Microsoft.Office.Interop.Owc11.Spreadsheet
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
myOWC.ActiveSheet.Cells(1, 1) = TextBox1.Text
End Sub
End Class