我们知道,在 Gembox Spreadsheet 中,您可以为单元格设置边框(使用 C# 语言),例如:
worksheet.Cells[row, 2].Style.Borders.SetBorders(MultipleBorders.All, Color.FromArgb(252, 1, 1), LineStyle.Thin);
这是一种检查单元格是否包含边框(底部或顶部边框)的方法?
更新
我找到了支持 Gembox 的解决方案:
var hasLeftBorder = cell.Style.Borders[IndividualBorder.Left].LineStyle != LineStyle.None;
最佳答案
看看on the Gembox Spreadsheet documentation page for the CellBorder
class . CellBorder
类有 2 个属性:LineColor
& LineStyle
- 使用 LineStyle
的 getter 属性并将其与 LineStyle
enumeration 进行比较
关于c# - Gembox 电子表格 C# : It is a way to detect if a cell has border?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25958480/