Excel Interop - Draw All Borders in a Range

后端 未结 7 1388
春和景丽
春和景丽 2020-12-17 18:29

I see from Microsoft\'s documentation that I can access the particular border edges of a cell using the \'xlBordersIndex\' property and for example set the border style for

7条回答
  •  北海茫月
    2020-12-17 18:45

    Microsoft.Office.Interop.Excel.Range tRange = xlWorkSheet.UsedRange;
            tRange.Borders.LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
            tRange.Borders.Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin;
    

提交回复
热议问题