I able to resolve the style related issue. Peter's code gave me hint to move
forward.
However, I am still struglling to figure out why it trows an exception when
I try to set the style for cell in a protected sheet which allows used to
Format Cells.
Any clue?
Thanks
-Sharad
"Sharad Vyas" wrote in message
...
Peter, Thanks!!
I tried both approaches the on you suggested here, which set the value
of NumberFormat property. However the problem I ran into this approach
is it changes the styles on other cells also which are using Number
formating style.
Then I tried the second approach where I am seeting the Style property,
which is assigned the Style object of my own. In this approach I loose
all the formating style that I have created in Excel (statically) like
colors, fonts and so.
Do you have any idea what is the Best approach in dealing with this?
Core objective is I want to retain the formating style I have created in
Excel, while updating a part of that style programatically( e.g.
NumberFormat), without messing up with the style on other cell.
Thanks in advance.
-Sharad
*** Sent via Developersdex http://www.developersdex.com ***