.NET + Microsoft.Office.Interop.Excel

Joined
Dec 22, 2005
Messages
2
Reaction score
0
Hi,

Im trying to display an excel sheet where the values are calulated in .Net using
Microsoft.Office.Interop.Excel

I have a value in column "J4" calculated by a formula.
The same formula should be applied to columns from "J5" - "J100".
Instead of iteration the formula in the loop...
Can I use AutoFill property to do that...

------------------------------------------------
Dim rngFrom As Microsoft.Office.Interop.Excel.Range = sheet.Range("J4")

Dim rngTo As Microsoft.Office.Interop.Excel.Range = sheet.Range("J5", "J100")

rngFrom.AutoFill(rngTo, Excel.XlAutoFillType.xlFillDefault)

------------------------------------------------

I am getting compile error while trying to display.
Can someone refine the code and post it.

Thanks.
 
Back
Top