2013-04-17 49 views

回答

1

是的,我得到了答案。雖然這樣做有些RND對於我意識到Furmula operatiion是工作:

SpreadsheetGear.IRange range = WorkBookViewForData.ActiveWorksheet.Cells["A10"]; 
range.Formula = "=SUM(A1:A9)" 
SpreadsheetGear.IRange range1 = WorkBookViewForData.ActiveWorksheet.Cells["A1"]; 
range1.value = "1" 
SpreadsheetGear.IRange range2 = WorkBookViewForData.ActiveWorksheet.Cells["A2"]; 
range2.value = "2" 
SpreadsheetGear.IRange range3 = WorkBookViewForData.ActiveWorksheet.Cells["A3"]; 
range3.value = "3" 

但隨着

SpreadsheetGear.IRange range = WorkBookViewForData.ActiveWorksheet.Cells["A10"]; 
    range.Formula = "=SUM(A1:A9)"    
    WorkBookViewForData.ActiveWorksheet.Cells["A1"].Value="1"; 
     WorkBookViewForData.ActiveWorksheet.Cells["A2"].Value="2"; 
     WorkBookViewForData.ActiveWorksheet.Cells["A3"].Value="3"; 

其中WorkBookViewForData是對的SpreadsheetGear控制