views:

520

answers:

1

Using Excel Interop (.NET) how can we set programmatically two different Excel formulas for every other column. For instance,

Range r = _sheet.get_Range(_sheet.Cells[1, 1], _sheet.Cells[I, J])  
r.Formula = "=something1"

will do it for every cell.

But within J columns every other column has to have formula "=something2".
The size of the range is known only at run-time.