'this is the code for the page that is run:
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports Excel = Microsoft.Office.Interop.Excel
Partial Class Report_Forecasting_Excel_1
Inherits System.Web.UI.Page
'Create Excel Objects
Dim thisExcel As Excel.Application
Dim thisWorkbook As Excel.Workbook
Dim thisWorksheet As Excel.Worksheet
Private Sub CreateSpreadsheet()
thisExcel = New Excel.Application
thisWorkbook = New Excel.Workbook
thisExcel.Workbooks.Add("D:\INTERNET\test\Test\Excel_Templates\Forecasting_Template_1.xls")
'thisWorkbook = thisExcel.Workbooks.Open(, )
thisExcel.Visible = True
thisWorkbook.Activate()
thisExcel.Workbooks.Add(thisWorkbook)
thisWorksheet = New Excel.Worksheet
thisWorkbook.Worksheets.Add(thisWorksheet)
thisWorkbook.Application.Visible = True
thisWorksheet.Cells(1, 1) = "hello there"
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
CreateSpreadsheet()
End Sub
End Class
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE