c# - Gembox 电子表格 C# : It is a way to detect if a cell has border?

标签 c# excel gembox-spreadsheet

我们知道,在 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/

相关文章:

c# - 如何在 C# 中使用可选参数?

c# - 在 .NET 中,调用 .Count() 还是调用 .Count 更好?

c# - Xamarin Forms 图像未显示在 ListView 中

excel - 在 Excel 中命名行为

vba - excel vba数字排序表

c# - Gembox 电子表格 : Is it possible to apply "Convert To Number" for the cells with warning?

c# - CollectionViewSource.Source 的调度程序更新在同一线程上抛出错误的线程异常

java - 如何在 Java 中创建受密码保护的 excel?

c# - 无法在 C# 中使用 Gembox 加载 .xls 文件

.net - GemBox - 滚动到 View 功能缺失?