回复 1楼noahark的帖子
什么平台的,Winform吗?
设置当前Cell的背景色,可用下面代码试试?
- fpSpread1.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors;
- fpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Range;
- fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell;
- fpSpread1.ActiveSheet.AddSelection(0, 0, 2, 2);
- fpSpread1.ActiveSheet.AddSelection(3, 0, 2, 2);
- fpSpread1.ActiveSheet.SelectionBackColor = Color.Red;
- fpSpread1.ActiveSheet.SelectionForeColor = Color.DarkBlue;
复制代码 |