A
Excel.Worksheet wks = Globals.ThisAddIn.Application.ActiveSheet as Excel.Worksheet;
wks.Range("A1").value2 = "Hi";
Instead use the get_Range Method of Worksheet Class
Excel.Worksheet wks = Globals.ThisAddIn.Application.ActiveSheet as Excel.Worksheet;
0020Excel.Range myRange = wks.get_Range("A1", System.Type.Missing);
myRange.Value2 = "Hello";
See also :
Object Arrays in C# using Indexers
Properties in .NET / Get and Set Methods in .NET
No comments:
Post a Comment