この例では、SheetViewオブジェクトをアクティブシートに割り当て、新しいNamedStyleオブジェクトを作成します。NamedStyle のBackColorとBorderを定義し、それをSheetViewのNamedStylesコレクションに追加します。
Dim sv As FarPoint.Web.Spread.SheetView
Dim style1 As New FarPoint.Web.Spread.NamedStyle()
style1.BackColor = Color.Yellow
style1.Border = New FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Red, 3)
sv = FpSpread1.ActiveSheetView
sv.NamedStyles.Add(style1)
sv.DefaultStyle=style1
FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.NamedStyle style1 = new FarPoint.Web.Spread.NamedStyle();
style1.BackColor = Color.Yellow;
style1.Border = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Red, 3);
sv.NamedStyles.Add(style1);
sv.DefaultStyle = style1;