Microsoft Office Tutorials and References
In Depth Information
Hello World example using Visual Studio 2008
5. Let's write our Hello World message in a cell when we load the Excel 2007
document. Write the following code inside the ThisWorkbook.cs file.
// The Startup event of workbook in our Excel solution
// Startup event common to all Office application
// Startup event will be fired at the start of the application
private void ThisWorkbook_Startup(object sender,
System.EventArgs e)
{
// Creating the instance of active WorkSheet of Excel Document
Excel.Worksheet AuthorWorkSheet = ThisApplication.ActiveSheet
as Excel.Worksheet;
// Get the range using number index through Excel cells
by setting AuthorExchange to an Excel range object starting at
(1,1) and ending at (1,1)
 
Search JabSto ::




Custom Search