在vb.net中格式化excel单元格边框
嗨,我很新的使用Visual Studio 2010生成Excel报告,我很难find正确的代码放在单元格的底部的边框。 到目前为止,我有这个代码工作正常,但它会把所有的边界。
Wsheet.Cells(9, itemcount + 2).borders.LineStyle = Excel.XlLineStyle.xlContinuous
得到它了! 这是我做的。
Wsheet.Cells(9, itemcount + 2).Borders(Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlContinuous
尝试这个
Wsheet.Cells(9, itemcount + 2).Borders(xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlContinuous
也可以参考这个,因为它更详细