I am creating an excel spreadsheet using automation where I need to set a border
on a range of cells. ie:
borders = range.GetBorders();
borders.SetWeight(COleVariant((float)3.5));
That does it, but it changes of all the borders, I just want to chage the weight
of borders outside the range of the cells, I don't want to have borders
seperating the cells within the range. It should be something simple, however I
wasn't able to find anything on MSDN on it.
Thanks in advance.
We can try the code below to render one border.
Border bottomborder;
bottomborder = borders.GetItem((long)9); //Top: 8, Left: 7,
Right: 10; Bottom: 9
bottomborder.SetLineStyle(
COleVariant((short)-4119)); //xlDouble
= -4119
bottomborder.SetWeight(
COleVariant((short)4)); //xlThick = 4
For detailed information, we can refe to KB:
http://support.microsoft.com/support/kb/articles/q179/7/06.asp
Regards,
Leo
"Slava Solovei" <slava....@defence.gov.aunospam> wrote in message
news:5fe401c0f2d7$c97ce5b0$a5e62ecf@tkmsftngxa07...