TableCellProperties クラス

定義

テーブル セルのプロパティ。

このクラスは、Office 2007 以降で使用できます。

オブジェクトを xml としてシリアル化されるときに、修飾名は w:tcPr です。

[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellWidth))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.GridSpan))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HorizontalMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.VerticalMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellBorders))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.NoWrap))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMargin))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TextDirection))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellFitText))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellVerticalAlignment))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HideMark))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellInsertion))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellDeletion))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellPropertiesChange))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]
[DocumentFormat.OpenXml.SchemaAttr(23, "tcPr")]
public class TableCellProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
public class TableCellProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr(23, "tcPr")]
public class TableCellProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("w:tcPr")]
public class TableCellProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("w:tcPr")]
public class TableCellProperties : DocumentFormat.OpenXml.TypedOpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellWidth))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.GridSpan))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HorizontalMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.VerticalMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellBorders))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.NoWrap))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMargin))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TextDirection))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellFitText))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellVerticalAlignment))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HideMark))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellInsertion))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellDeletion))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellPropertiesChange))]
public class TableCellProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellWidth))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.GridSpan))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HorizontalMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.VerticalMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellBorders))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.NoWrap))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMargin))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TextDirection))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellFitText))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellVerticalAlignment))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HideMark))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellInsertion))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellDeletion))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellMerge))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellPropertiesChange))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]
public class TableCellProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellWidth))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.GridSpan))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HorizontalMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.VerticalMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellBorders))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.NoWrap))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMargin))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TextDirection))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellFitText))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellVerticalAlignment))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HideMark))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellInsertion))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellDeletion))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellPropertiesChange))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]
[<DocumentFormat.OpenXml.SchemaAttr(23, "tcPr")>]
type TableCellProperties = class
    inherit OpenXmlCompositeElement
type TableCellProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr(23, "tcPr")>]
type TableCellProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("w:tcPr")>]
type TableCellProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("w:tcPr")>]
type TableCellProperties = class
    inherit TypedOpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellWidth))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.GridSpan))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HorizontalMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.VerticalMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellBorders))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.NoWrap))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMargin))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TextDirection))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellFitText))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellVerticalAlignment))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HideMark))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellInsertion))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellDeletion))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellPropertiesChange))>]
type TableCellProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.ConditionalFormatStyle))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellWidth))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.GridSpan))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HorizontalMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.VerticalMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellBorders))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.NoWrap))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMargin))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TextDirection))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellFitText))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellVerticalAlignment))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.HideMark))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellInsertion))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellDeletion))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.CellMerge))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellPropertiesChange))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]
type TableCellProperties = class
    inherit OpenXmlCompositeElement
Public Class TableCellProperties
Inherits OpenXmlCompositeElement
Public Class TableCellProperties
Inherits TypedOpenXmlCompositeElement
継承
継承
属性

次の例では、ワープロ ドキュメントにテーブルを作成し、 クラスを TableCellProperties 使用してテーブル セルの幅を指定します。

using System;  
using DocumentFormat.OpenXml;  
using DocumentFormat.OpenXml.Packaging;  
using DocumentFormat.OpenXml.Wordprocessing;  

namespace TableCellPropertiesEx  
{  
    class Program  
    {  
         // Insert a table into an existing word processing document.  
        static void Main(string[] args)  
        {  
            string fileName = @"C:\users\public\documents\TableCellPropertiesEx.docx";  
            using (WordprocessingDocument document  
                = WordprocessingDocument.Open(fileName, true))  
            {  
                // Create an empty table.  
                Table table = new Table();  

                // Create a TableProperties object and specify its border information.  
                TableProperties tblProp = new TableProperties(  
                    new TableBorders(new TopBorder()  
                        { Val = new EnumValue<BorderValues>(BorderValues.Sawtooth), Size = 24 },  
                        new BottomBorder()  
                        { Val = new EnumValue<BorderValues>(BorderValues.Sawtooth), Size = 24 },  
                        new LeftBorder()  
                        { Val = new EnumValue<BorderValues>(BorderValues.Sawtooth), Size = 24 },  
                        new RightBorder()  
                        { Val = new EnumValue<BorderValues>(BorderValues.Sawtooth), Size = 24 },  
                        new InsideHorizontalBorder()  
                        { Val = new EnumValue<BorderValues>(BorderValues.Sawtooth), Size = 24 },  
                        new InsideVerticalBorder()  
                        { Val = new EnumValue<BorderValues>(BorderValues.Sawtooth), Size = 24 } )  
                );  

                // Append the TableProperties object to the empty table.  
                table.AppendChild<TableProperties>(tblProp);  

                // Create a row and a cell.  
                TableRow tableRow = new TableRow();  
                TableCell tableCell1 = new TableCell();  

                // Specify the width property of the table cell.  
                tableCell1.Append(new TableCellProperties(  
                    new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "2400" }));  

                // Write some text in the cell.  
                tableCell1.Append(new Paragraph(new Run(new Text("Some cell text."))));  

                // Append the cell to the row.  
                tableRow.Append(tableCell1);  

                // Create a second table cell by copying the OuterXml value of the first table cell.  
                TableCell tableCell2 = new TableCell(tableCell1.OuterXml);  

                // Append the cell to the row.  
                tableRow.Append(tableCell2);  

                // Append the table row to the table.  
                table.Append(tableRow);  

                // Append the table to the document.  
                document.MainDocumentPart.Document.Body.Append(table);  
            }  
        }  
    }  
}  
Imports DocumentFormat.OpenXml  
Imports DocumentFormat.OpenXml.Packaging  
Imports DocumentFormat.OpenXml.Wordprocessing  

Module Module1  
    ' Insert a table into an existing word processing document.  
    Sub Main(ByVal args As String())  
        Dim fileName As String = "C:\users\public\documents\TableCellPropertiesEx.docx"  
        Using document As WordprocessingDocument = WordprocessingDocument.Open(fileName, True)  
            ' Create an empty table.  
            Dim table As New Table()  

            ' Create a TableProperties object and specify its border information.  
            Dim tblProp As New TableProperties(New TableBorders(New TopBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Sawtooth), _  
             .Size = 24 _  
            }, New BottomBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Sawtooth), _  
             .Size = 24 _  
            }, New LeftBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Sawtooth), _  
             .Size = 24 _  
            }, New RightBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Sawtooth), _  
             .Size = 24 _  
            }, New InsideHorizontalBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Sawtooth), _  
             .Size = 24 _  
            }, New InsideVerticalBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Sawtooth), _  
             .Size = 24 _  
            }))  

            ' Append the TableProperties object to the empty table.  
            table.AppendChild(Of TableProperties)(tblProp)  

            ' Create a row and a cell.  
            Dim tableRow As New TableRow()  
            Dim tableCell1 As New TableCell()  

            ' Specify the width property of the table cell.  
            tableCell1.Append(New TableCellProperties(New TableCellWidth() With { _  
             .Type = TableWidthUnitValues.Dxa, _  
             .Width = "2400" _  
            }))  

            ' Write some text in the cell.  
            tableCell1.Append(New Paragraph(New Run(New Text("Some cell text."))))  

            ' Append the cell to the row.  
            tableRow.Append(tableCell1)  

            ' Create a second table cell by copying the OuterXml value of the first table cell.  
            Dim tableCell2 As New TableCell(tableCell1.OuterXml)  

            ' Append the cell to the row.  
            tableRow.Append(tableCell2)  

            ' Append the table row to the table.  
            table.Append(tableRow)  

            ' Append the table to the document.  
            document.MainDocumentPart.Document.Body.Append(table)  
        End Using  
    End Sub  
End Module  

注釈

[ISO/IEC 29500-1 1st Edition]

tcPr (テーブル セルのプロパティ)

この要素は、特定のテーブル セルを適用するプロパティのセットを指定します。 各一意プロパティは、この要素の子要素によって指定されます。 テーブル レベル、テーブル レベルの例外、または行レベルのプロパティと対応するテーブル セル プロパティとの間に競合がある場合は、これらのプロパティによってテーブルまたは行全体のプロパティが上書きされます。

[: セルの幅が、次の WordprocessingML で表されるテーブル幅を上書きするテーブルを考えてみましょう。

<w:tbl>  
  <w:tblPr>  
    <w:tblCellMar>  
      <w:left w:w="0" w:type="dxa"/>  
    </w:tblCellMar>  
  </w:tblPr>  
  …  <w:tr>  
    <w:tc>  
      <w:tcPr>  
        <w:tcMar>  
          <w:left w:w="720" w:type="dxa"/>  
        </w:tcMar>  
      </w:tcPr>  
      …    </w:tc>  
  </w:tr>  
</w:tbl>  

このテーブル セルの左セルの余白は、tcMar 要素で指定されているポイントの 720 twentieths (1/2 インチ) で、テーブル レベルの設定 である 0 左のテーブル セル余白が上書きされます。 例終わり]

親の要素
tc (§17.4.66)
子要素 Subclause
cellDel (テーブル セルの削除) §17.13.5.1
cellIns (テーブル セルの挿入) §17.13.5.2
cellMerge (垂直方向にマージ/分割されたテーブル セル) §17.13.5.3
cnfStyle (テーブル セルの条件付き書式) §17.4.8
gridSpan (現在のテーブル セルでスパンされるグリッド列) §17.4.17
headers (テーブル セルに関連付けられているヘッダー セル) §17.4.19
hideMark (行の高さの計算でセルの末尾マーカーを無視) §17.4.21
hMerge (水平方向に結合されたセル) §17.4.22
noWrap (セル コンテンツをラップしない) §17.4.30
shd (Table Cell Shading) §17.4.33
tcBorders (テーブル セルの罫線) §17.4.67
tcFitText (セル内にテキストをフィット) §17.4.68
tcMar (単一テーブル セルの余白) §17.4.69
tcPrChange (テーブル セルプロパティのリビジョン情報) §17.13.5.36
tcW (優先テーブル セル幅) §17.4.72
textDirection (Table Cell Text Flow Direction) §17.4.73
vAlign (テーブル セルの垂直方向の配置) §17.4.84
vMerge (垂直方向にマージされたセル) §17.4.85

[: この要素のコンテンツ モデル (CT_TcPr) の W3C XML スキーマ定義は§A.1 にあります。 メモの終了]

[ISO/IEC 29500-1 1st Edition]

tcPr (テーブル スタイルの条件付き書式テーブル セルのプロパティ)

この要素は、親 tblStylePr 要素で指定された条件付き書式の種類に一致するテーブル内のすべての領域に適用されるテーブル セル プロパティのセットを指定します。 これらのプロパティは、スタイル階層で指定された順序で適用されます。

[: firstRow の条件付き書式を含むテーブル スタイルを次のように定義するとします。

<w:style w:type="table" w:styleId="exampleTableStyle">  
  …  <w:tblStylePr w:type="firstRow">  
    <w:tcPr>  
      <w:tcBorders>  
        <w:top w:val="nil" />  
        <w:left w:val="nil" />  
        <w:bottom w:val="nil" />  
        <w:right w:val="nil" />  
        <w:insideH w:val="nil" />  
        <w:insideV w:val="nil" />  
      </w:tcBorders>  
    </w:tcPr>  
    …  </w:tblStylePr>  
</w:style>  

tblStylePr 要素内で指定された tcPr 要素は、 firstRow の型値で指定された条件を満たすテーブルのすべての部分 (テーブルのすべてのヘッダー行) に適用する必要があるテーブル セル プロパティのセットを指定します。 この例では、適用される単一のテーブル セル プロパティは、tcBorders 要素 (§17.4.67) を介したテーブル セル境界のセットです。 この場合、これらのセル罫線は、単に前のセルの罫線を nil にリセットします。 例終わり]

親の要素
tblStylePr (§17.7.6.6)
子要素 Subclause
cellDel (テーブル セルの削除) §17.13.5.1
cellIns (テーブル セルの挿入) §17.13.5.2
cellMerge (垂直方向にマージ/分割されたテーブル セル) §17.13.5.3
cnfStyle (テーブル セルの条件付き書式) §17.4.8
gridSpan (現在のテーブル セルでスパンされるグリッド列) §17.4.17
headers (テーブル セルに関連付けられているヘッダー セル) §17.4.19
hideMark (行の高さの計算でセルの末尾マーカーを無視) §17.4.21
hMerge (水平方向に結合されたセル) §17.4.22
noWrap (セル コンテンツをラップしない) §17.4.30
shd (Table Cell Shading) §17.4.33
tcBorders (テーブル セルの罫線) §17.4.67
tcFitText (セル内にテキストをフィット) §17.4.68
tcMar (単一テーブル セルの余白) §17.4.69
tcPrChange (テーブル セルプロパティのリビジョン情報) §17.13.5.36
tcW (優先テーブル セル幅) §17.4.72
textDirection (Table Cell Text Flow Direction) §17.4.73
vAlign (テーブル セルの垂直方向の配置) §17.4.84
vMerge (垂直方向にマージされたセル) §17.4.85

[: この要素のコンテンツ モデル (CT_TcPr) の W3C XML スキーマ定義は§A.1 にあります。 メモの終了]

[ISO/IEC 29500-1 1st Edition]

tcPr (スタイル テーブル セルのプロパティ)

この要素は、テーブルに適用するテーブル セル プロパティのセットを指定します。 これらのプロパティは条件付きではなく、常に適用されます (ただし、すべての条件付き書式プロパティの前に適用されます)。

[: 次のように定義されたテーブル スタイルを検討してください。

<w:style w:type="table" w:styleId="exampleTableStyle">  
  <w:tcPr>  
    <w:tcFitText/>  
  </w:tcPr>  
</w:style>  

style 要素内で指定された tcPr 要素は、テーブルのすべての部分に適用する必要があるテーブル セル プロパティのセットを指定します。 この例では、適用される単一のテーブル セル プロパティは、tcFitText 要素 (§17.4.68) を使用したフィット テキスト設定です。 例終わり]

親の要素
style (§17.7.4.17)
子要素 Subclause
cellDel (テーブル セルの削除) §17.13.5.1
cellIns (テーブル セルの挿入) §17.13.5.2
cellMerge (垂直方向にマージ/分割されたテーブル セル) §17.13.5.3
cnfStyle (テーブル セルの条件付き書式) §17.4.8
gridSpan (現在のテーブル セルでスパンされるグリッド列) §17.4.17
headers (テーブル セルに関連付けられているヘッダー セル) §17.4.19
hideMark (行の高さの計算でセルの末尾マーカーを無視) §17.4.21
hMerge (水平方向に結合されたセル) §17.4.22
noWrap (セル コンテンツをラップしない) §17.4.30
shd (Table Cell Shading) §17.4.33
tcBorders (テーブル セルの罫線) §17.4.67
tcFitText (セル内にテキストをフィット) §17.4.68
tcMar (単一テーブル セルの余白) §17.4.69
tcPrChange (テーブル セルプロパティのリビジョン情報) §17.13.5.36
tcW (優先テーブル セル幅) §17.4.72
textDirection (Table Cell Text Flow Direction) §17.4.73
vAlign (テーブル セルの垂直方向の配置) §17.4.84
vMerge (垂直方向にマージされたセル) §17.4.85

[: この要素のコンテンツ モデル (CT_TcPr) の W3C XML スキーマ定義は§A.1 にあります。 メモの終了]

ISO/IEC29500: 2008。

コンストラクター

TableCellProperties()

TableCellProperties クラスの新しいインスタンスを初期化します。

TableCellProperties(IEnumerable<OpenXmlElement>)

指定した子要素を使用して TableCellProperties クラスの新しいインスタンスを初期化します。

TableCellProperties(OpenXmlElement[])

指定した子要素を使用して TableCellProperties クラスの新しいインスタンスを初期化します。

TableCellProperties(String)

外部 XML から TableCellProperties クラスの新しいインスタンスを初期化します。

プロパティ

ChildElements

現在の要素のすべての子ノードを取得します。

(継承元 OpenXmlElement)
ConditionalFormatStyle

ConditionalFormatStyle。

スキーマ内の次の要素タグを表します: w:cnfStyle。

ExtendedAttributes

現在の要素のすべての拡張属性 (スキーマで定義されていない属性) を取得します。

(継承元 OpenXmlElement)
Features

現在の要素の を IFeatureCollection 取得します。 この機能コレクションは読み取り専用ですが、使用可能な場合は親パーツとパッケージから機能を継承します。

(継承元 OpenXmlElement)
FirstChild

現在の OpenXmlElement 要素の最初の子を取得します。

(継承元 OpenXmlCompositeElement)
GridSpan

GridSpan。

スキーマ内の次の要素タグを表します: w:gridSpan。

HasAttributes

現在の要素に属性があるかどうかを示す値を取得します。

(継承元 OpenXmlElement)
HasChildren

現在の要素に子要素があるかどうかを示す値を取得します。

(継承元 OpenXmlCompositeElement)
HideMark

HideMark。

スキーマ内の次の要素タグを表します。 w:hideMark。

HorizontalMerge

HorizontalMerge。

スキーマ内の次の要素タグを表します: w:hMerge。

InnerText

現在のノードとそのすべての子の連結値を取得または設定します。

(継承元 OpenXmlCompositeElement)
InnerXml

現在のノードの子ノードのみを表すマークアップを取得または設定します。

(継承元 OpenXmlCompositeElement)
LastChild

現在の OpenXmlElement 要素の最後の子を取得します。 このような OpenXmlElement 要素がない場合は、null (Visual Basic では Nothing) を返します。

(継承元 OpenXmlCompositeElement)
LocalName

テーブル セルのプロパティ。

このクラスは、Office 2007 以降で使用できます。

オブジェクトを xml としてシリアル化されるときに、修飾名は w:tcPr です。

LocalName

現在の要素のローカル名を取得します。

(継承元 OpenXmlElement)
MCAttributes

マークアップ互換性属性を取得または設定します。 現在の要素に対してマークアップ互換性属性が定義されていない場合は null を返します。

(継承元 OpenXmlElement)
NamespaceDeclarations

現在の要素で定義されているすべての名前空間宣言を取得します。 名前空間宣言がない場合は、空の列挙子を返します。

(継承元 OpenXmlElement)
NamespaceUri

現在の要素の名前空間 URI を取得します。

(継承元 OpenXmlElement)
NoWrap

Nowrap。

スキーマ内の次の要素タグを表します: w:noWrap。

OpenXmlElementContext

現在の要素の OpenXmlElementContext を取得します。

(継承元 OpenXmlElement)
OuterXml

現在の要素とそのすべての子要素を表すマークアップを取得します。

(継承元 OpenXmlElement)
Parent

現在の要素の親要素を取得します。

(継承元 OpenXmlElement)
Prefix

現在の要素の名前空間プレフィックスを取得します。

(継承元 OpenXmlElement)
Shading

網かけ

スキーマ内の次の要素タグを表します: w:shd。

TableCellBorders

TableCellBorders。

スキーマの要素タグ w:tcBorders を表します。

TableCellFitText

TableCellFitText。

スキーマ内の次の要素タグを表します: w:tcFitText。

TableCellMargin

TableCellMargin。

スキーマ内の次の要素タグを表します: w:tcMar。

TableCellVerticalAlignment

TableCellVerticalAlignment。

スキーマ内の次の要素タグを表します: w:vAlign。

TableCellWidth

TableCellWidth。

スキーマ内の次の要素タグを表します: w:tcW。

TextDirection

TextDirection。

スキーマ内の次の要素タグを表します: w:textDirection。

VerticalMerge

VerticalMerge。

スキーマの要素タグ w:vMerge を表します。

XmlQualifiedName

現在の要素の修飾名を取得します。

(継承元 OpenXmlElement)
XName

現在の要素の修飾名を取得します。

(継承元 OpenXmlElement)

メソッド

AddAnnotation(Object)

現在の OpenXmlElement 要素の注釈の一覧にオブジェクトを追加します。

(継承元 OpenXmlElement)
AddChild(OpenXmlElement, Boolean)

指定した要素が既知の子である場合は、 要素に追加します。 これにより、 要素がスキーマに従って正しい場所に追加されます。

(継承元 OpenXmlCompositeElement)
AddNamespaceDeclaration(String, String)

現在のノードに名前空間宣言を追加します。

(継承元 OpenXmlElement)
Ancestors()

現在の要素のすべての先祖を列挙します。

(継承元 OpenXmlElement)
Ancestors<T>()

指定した型を持つ現在の要素の先祖のみを列挙します。

(継承元 OpenXmlElement)
Annotation(Type)

現在の OpenXmlElement 要素から、指定した型の最初の注釈オブジェクトを取得します。

(継承元 OpenXmlElement)
Annotation<T>()

現在の OpenXmlElement 要素から、指定した型の最初の注釈オブジェクトを取得します。

(継承元 OpenXmlElement)
Annotations(Type)

現在の OpenXmlElement 要素の指定した型を持つ注釈のコレクションを取得します。

(継承元 OpenXmlElement)
Annotations<T>()

現在の OpenXmlElement 要素の指定した型を持つ注釈のコレクションを取得します。

(継承元 OpenXmlElement)
Append(IEnumerable<OpenXmlElement>)

要素のリストから現在の要素の子要素のリストの末尾に各要素を追加します。

(継承元 OpenXmlElement)
Append(OpenXmlElement[])

要素の配列から、現在の要素の子要素のリストの末尾に各要素を追加します。

(継承元 OpenXmlElement)
AppendChild<T>(T)

現在の要素の子ノードのリストの末尾に、指定した要素を追加します。

(継承元 OpenXmlCompositeElement)
ClearAllAttributes()

既知の属性と拡張属性の両方を含むすべての属性をクリアします。

(継承元 OpenXmlElement)
Clone()

現在のノードの複製を作成します。

(継承元 OpenXmlElement)
CloneNode(Boolean)

このノードの複製を作成します。

Descendants()

現在の要素のすべての子孫を列挙します。

(継承元 OpenXmlElement)
Descendants<T>()

T 型のすべての現在の要素の子孫を列挙します。

(継承元 OpenXmlElement)
Elements()

現在の要素のすべての子を列挙します。

(継承元 OpenXmlElement)
Elements<T>()

指定した型を持つ現在の要素の子のみを列挙します。

(継承元 OpenXmlElement)
ElementsAfter()

現在の要素に続き、現在の要素と同じ親を持つすべての兄弟要素を列挙します。

(継承元 OpenXmlElement)
ElementsBefore()

現在の要素の前にあり、現在の要素と同じ親を持つすべての兄弟要素を列挙します。

(継承元 OpenXmlElement)
GetAttribute(String, String)

指定したタグ名と名前空間 URI を持つ Open XML 属性を取得します。

(継承元 OpenXmlElement)
GetAttributes()

すべての属性のコピーを含むリストを取得します。

(継承元 OpenXmlElement)
GetEnumerator()

子コレクションを反復処理する列挙子を返します。

(継承元 OpenXmlElement)
GetFirstChild<T>()

T 型の最初の子要素を検索します。

(継承元 OpenXmlElement)
InsertAfter<T>(T, OpenXmlElement)

指定した参照要素の直後に、指定した要素を挿入します。

(継承元 OpenXmlCompositeElement)
InsertAfterSelf<T>(T)

現在の要素の直後に、指定した要素を挿入します。

(継承元 OpenXmlElement)
InsertAt<T>(T, Int32)

現在の要素の子の指定したインデックス位置に、指定した要素を挿入します。

(継承元 OpenXmlCompositeElement)
InsertBefore<T>(T, OpenXmlElement)

指定した参照要素の直前に、指定した要素を挿入します。

(継承元 OpenXmlCompositeElement)
InsertBeforeSelf<T>(T)

現在の要素の直前に、指定した要素を挿入します。

(継承元 OpenXmlElement)
IsAfter(OpenXmlElement)

指定した要素の後に現在の要素がドキュメントの順序で表示されるかどうかを判断します。

(継承元 OpenXmlElement)
IsBefore(OpenXmlElement)

指定した要素の前に現在の要素がドキュメントの順序で表示されるかどうかを判断します。

(継承元 OpenXmlElement)
LookupNamespace(String)

現在のノードのコンテキストの名前空間プレフィックスを解決します。

(継承元 OpenXmlElement)
LookupPrefix(String)

現在の要素スコープ内の名前空間 URI の対応するプレフィックスを検索します。

(継承元 OpenXmlElement)
NextSibling()

現在の OpenXmlElement 要素の直後にある OpenXmlElement 要素を取得します。 次の OpenXmlElement 要素がない場合は null (Visual Basic では Nothing) を返します。

(継承元 OpenXmlElement)
NextSibling<T>()

現在の OpenXmlElement 要素に続く指定した型を持つ OpenXmlElement 要素を取得します。 次の OpenXmlElement がない場合は、null (Visual Basic では Nothing) を返します。

(継承元 OpenXmlElement)
PrependChild<T>(T)

現在の要素の子ノードのリストの先頭に、指定した要素を挿入します。

(継承元 OpenXmlCompositeElement)
PreviousSibling()

現在の OpenXmlElement 要素のすぐ前にある OpenXmlElement 要素を取得します。 前に OpenXmlElement 要素がない場合は、null (Visual Basic では Nothing) を返します。

(継承元 OpenXmlElement)
PreviousSibling<T>()

現在の OpenXmlElement の前に指定された型を持つ OpenXmlElement 要素を取得します。 前に OpenXmlElement 要素がない場合は null (Visual Basic では Nothing) を返します。

(継承元 OpenXmlElement)
Remove()

現在の要素を親から削除します。

(継承元 OpenXmlElement)
RemoveAllChildren()

現在の要素のすべての子要素を削除します。

(継承元 OpenXmlCompositeElement)
RemoveAllChildren<T>()

T 型の現在の要素の子要素をすべて削除します。

(継承元 OpenXmlElement)
RemoveAnnotations(Type)

指定した型の注釈を現在の OpenXmlElement 要素から削除します。

(継承元 OpenXmlElement)
RemoveAnnotations<T>()

指定した型の注釈を現在の OpenXmlElement 要素から削除します。

(継承元 OpenXmlElement)
RemoveAttribute(String, String)

現在の要素から 属性を削除します。

(継承元 OpenXmlElement)
RemoveChild<T>(T)

指定した子要素を削除します。

(継承元 OpenXmlCompositeElement)
RemoveNamespaceDeclaration(String)

指定したプレフィックスの名前空間宣言を削除します。 プレフィックスがない場合は、何も削除しません。

(継承元 OpenXmlElement)
ReplaceChild<T>(OpenXmlElement, T)

現在の要素の子要素の 1 つを別の OpenXmlElement 要素に置き換えます。

(継承元 OpenXmlCompositeElement)
SetAttribute(OpenXmlAttribute)

指定した要素に属性を設定します。 属性が既知の属性の場合、属性の値が設定されます。 属性が拡張属性の場合は、拡張属性リストに 'openxmlAttribute' が追加されます。

(継承元 OpenXmlElement)
SetAttributes(IEnumerable<OpenXmlAttribute>)

要素に複数の属性を設定します。 属性が既知の属性の場合、属性の値が設定されます。 属性が拡張属性の場合は、拡張属性リストに 'openxmlAttribute' が追加されます。

(継承元 OpenXmlElement)
WriteTo(XmlWriter)

現在のノードを指定した XmlWriter に保存します。

(継承元 OpenXmlElement)

明示的なインターフェイスの実装

IEnumerable.GetEnumerator()

テーブル セルのプロパティ。

このクラスは、Office 2007 以降で使用できます。

オブジェクトを xml としてシリアル化されるときに、修飾名は w:tcPr です。

(継承元 OpenXmlElement)
IEnumerable<OpenXmlElement>.GetEnumerator()

子コレクションを反復処理する列挙子を返します。

(継承元 OpenXmlElement)

適用対象