Sharad Vyas
2005-12-15 16:00:31 UTC
I am working with VSTO with C#. My worksheet has 10 Columns and many nows.
Some of the cell contains formula and other are populated with data from the
data source.I define formating, formulas and fill in all cells with 0s
(where there is no formula). I have to compute Meaid across the column for
each row. When I load the data, it dictates whether I will have 2 or 4 or
all 10 columns filled in. Once I load the data (lets say 4 columns),
programatically I clear the remaining 6 columns. All works fine until this
point. If I change some parameter and reload the data in the same session,
and lets say it has (5 columns) more than 4 columns this time, all the cells
, which had formula, for 5th columns, remains null. Data load is just fine.
The reason for this issue is that when I cleared the 6 columns during my
first data loas, it cleared my formula too.
My quesitons is how can I maitain/keep the formula, which I set in the
Excel, whiling Clearing the cell programtically. As I said I am using C#
with VSTO and using Excel object model;s Range.Clear() method to clear the
cell.
Help greatly appreiciated!!
-Sharad
Some of the cell contains formula and other are populated with data from the
data source.I define formating, formulas and fill in all cells with 0s
(where there is no formula). I have to compute Meaid across the column for
each row. When I load the data, it dictates whether I will have 2 or 4 or
all 10 columns filled in. Once I load the data (lets say 4 columns),
programatically I clear the remaining 6 columns. All works fine until this
point. If I change some parameter and reload the data in the same session,
and lets say it has (5 columns) more than 4 columns this time, all the cells
, which had formula, for 5th columns, remains null. Data load is just fine.
The reason for this issue is that when I cleared the 6 columns during my
first data loas, it cleared my formula too.
My quesitons is how can I maitain/keep the formula, which I set in the
Excel, whiling Clearing the cell programtically. As I said I am using C#
with VSTO and using Excel object model;s Range.Clear() method to clear the
cell.
Help greatly appreiciated!!
-Sharad