private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.ColumnHeader.RowCount = 3;
// 結合した列ヘッダセルのラベルを定義します。
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 0].Text = "A期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 1].Text = "B期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 2].Text = "A期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 3].Text = "B期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 4].Text = "A期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 5].Text = "B期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 6].Text = "A期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 7].Text = "B期間";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 0].Text = "第1四半期";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 2].Text = "第2四半期";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 4].Text = "第3四半期";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 6].Text = "第4四半期";
fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 0].Text = "今年度(内訳)";
// 列ヘッダのセル結合を定義します。
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 0, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 2, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 4, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 6, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, 8);
// ヘッダクリック時の選択範囲を設定します。
fpSpread1.CellSpanSelectionPolicy = FarPoint.Win.Spread.CellSpanSelectionPolicy.Contained;
}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' 列ヘッダ内の行数を設定します。
FpSpread1.ActiveSheet.ColumnHeader.RowCount = 3
' 結合した列ヘッダセルのラベルを定義します。
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 0).Text = "A期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 1).Text = "B期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 2).Text = "A期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 3).Text = "B期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 4).Text = "A期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 5).Text = "B期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 6).Text = "A期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 7).Text = "B期間"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 0).Text = "第1四半期"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 2).Text = "第2四半期"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 4).Text = "第3四半期"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 6).Text = "第4四半期"
FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 0).Text = "今年度(内訳)"
' 列ヘッダのセル結合を定義します。
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 0, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 2, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 4, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 6, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, 8)
' ヘッダクリック時の選択範囲を設定します。
FpSpread1.CellSpanSelectionPolicy = FarPoint.Win.Spread.CellSpanSelectionPolicy.Contained
End Sub