Infragistics2.Excel.v10.3
CellFormat プロパティ
参照  使用例 このトピックについてのご意見・ご感想をEメールにてお寄せください (日本語と英語に対応しています)。 また、弊社サービス・製品についてご質問・ご要望などがございましたら、こちらからお気軽にお問い合わせください。
Infragistics.Excel 名前空間 > WorksheetMergedCellsRegion クラス : CellFormat プロパティ

この結合されたセル領域のセル書式を取得します。

シンタックス

Visual Basic (宣言) 
Public ReadOnly Property CellFormat As IWorksheetCellFormat
C# 
public IWorksheetCellFormat CellFormat {get;}

プロパティ値

この結合されたセル領域のセル書式。

使用例

The following code demonstartes how to create and modify merged regions.

Visual Basicコードのコピー
Imports Infragistics.Excel

' Create a workbook with a worksheet
Dim workbook As New Workbook()
Dim worksheet1 As Worksheet = workbook.Worksheets.Add("Sheet1")

' Create a merged region from D3 to E6 and set its value
Dim mergedD3ToE6 As WorksheetMergedCellsRegion = worksheet1.MergedCellsRegions.Add(2, 3, 5, 4)
mergedD3ToE6.Value = 10

' Create a merged region from G3 to H6 and apply a formula to it which uses the 
' value from the first merged region.
' Note: When using a merged region's value in a formula, you must reference the top-left
' cell of the merged region.
Dim mergedG3ToH6 As WorksheetMergedCellsRegion = worksheet1.MergedCellsRegions.Add(2, 6, 5, 7)
mergedG3ToH6.ApplyFormula("=D3*5")

' Center the value of the formula
mergedG3ToH6.CellFormat.Alignment = HorizontalCellAlignment.Center
C#コードのコピー
using System.Windows.Forms;
using Infragistics.Excel;

// Create a workbook with a worksheet
Workbook workbook = new Workbook();
Worksheet worksheet1 = workbook.Worksheets.Add( "Sheet1" );

// Create a merged region from D3 to E6 and set its value
WorksheetMergedCellsRegion mergedD3ToE6 = worksheet1.MergedCellsRegions.Add( 2, 3, 5, 4 );
mergedD3ToE6.Value = 10;

// Create a merged region from G3 to H6 and apply a formula to it which uses the 
// value from the first merged region.
// Note: When using a merged region's value in a formula, you must reference the top-left
// cell of the merged region.
WorksheetMergedCellsRegion mergedG3ToH6 = worksheet1.MergedCellsRegions.Add( 2, 6, 5, 7 );
mergedG3ToH6.ApplyFormula( "=D3*5" );

// Center the value of the formula
mergedG3ToH6.CellFormat.Alignment = HorizontalCellAlignment.Center;

参照