ExcelRW: Formatting borders for a range of cells

Hi, I''m having some problems formatting a whole range with only the outter borders... I guess I''m missing some very basic concept. Basically, what I''m doing is this, for example: Dim mR As Syncfusion.ExcelRW.IRange mR = sheet.Range(2, 2, 10, 10) mR.Borders.Item(ExcelBordersIndex.EdgeBottom).LineStyle = ExcelLineStyle.Thin mR.Borders.Item(ExcelBordersIndex.EdgeTop).LineStyle = ExcelLineStyle.Thin mR.Borders.Item(ExcelBordersIndex.EdgeLeft).LineStyle = ExcelLineStyle.Thin mR.Borders.Item(ExcelBordersIndex.EdgeRight).LineStyle = ExcelLineStyle.Thin This is setting the borders for every cell in my range, but I only want to set the box-like borders for my whole range, or just the columns borders, etc. What am I missing? Thank you very much Roberto

2 Replies

AD Administrator Syncfusion Team November 15, 2005 06:58 AM UTC

Hi Roberto, I herewith attach a workaround: bordersetting.zip Please take a look and let me know if you have any questions. Thanks for your interest with Syncfusion products. Best Regards, Seetha >Hi, > >I''m having some problems formatting a whole range with only the outter borders... I guess I''m missing some very basic concept. > >Basically, what I''m doing is this, for example: > >Dim mR As Syncfusion.ExcelRW.IRange > >mR = sheet.Range(2, 2, 10, 10) > >mR.Borders.Item(ExcelBordersIndex.EdgeBottom).LineStyle = ExcelLineStyle.Thin >mR.Borders.Item(ExcelBordersIndex.EdgeTop).LineStyle = ExcelLineStyle.Thin >mR.Borders.Item(ExcelBordersIndex.EdgeLeft).LineStyle = ExcelLineStyle.Thin >mR.Borders.Item(ExcelBordersIndex.EdgeRight).LineStyle = ExcelLineStyle.Thin > >This is setting the borders for every cell in my range, but I only want to set the box-like borders for my whole range, or just the columns borders, etc. > >What am I missing? > >Thank you very much > > Roberto


RO Roberto Obispo November 15, 2005 02:14 PM UTC

Thank you very much, that works perfectly. Roberto Obispo

Loader.
Up arrow icon