本帖最后由 qimeimeiqi 于 2019-9-19 15:17 编辑
总结一下解决方法,方便大家参考
FarPoint.Win.LineBorder lineBorder = new FarPoint.Win.LineBorder(Color.Red);
StyleInfo style = new StyleInfo();
style.Border = lineBorder;
fpSpread1.ActiveSheet.SetStyleInfo(-1, -1, style); //默认全表单元格样式
fpSpread1.ActiveSheet.ColumnHeader.Rows[0].Border = lineBorder; //列头边框
for (int bor = 0; bor < 9; bor++) // 数字9的含义为从0到8列设置列头
{
fpSpread1.ActiveSheet.ColumnHeader.Cells[0, bor].Border = lineBorder; //列头边框
}
|