hi,
I made an activex control that opens an new excel document.
This control is an image.
Code for my activex control:
I added it in my web application through the object tag:Code:Private Sub image_GotFocus() Dim oExcel As Excel.Application Dim oWB As Excel.Workbook Dim oWS As Excel.Worksheet Set oExcel = New Excel.Application oExcel.Visible = True ' <-- *** Optional *** Set oWB = oExcel.Workbooks.Add Set oWS = oWB.Worksheets("Sheet1") End Sub
Since this control is for opening an excel window only,Code:<OBJECT id="Open" Width="120px" Height="32px"classid="CLSID:460485C2-980B-45E5-8051-04A1EFBB18E4"></OBJECT>
I wanted to add few more codes for populating the excel sheet with contents of a gridview.
But the problem is,I don't know how to use the embedded control in the object tag.
Any ideas?
Thanks!
Sheila


Reply With Quote