是的,需要注意的是V12之后要设置下spread的兼容模式
- this.fpSpread1 = new FarPoint.Win.Spread.FpSpread(FarPoint.Win.Spread.LegacyBehaviors.Style);
复制代码- 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;
复制代码 |