Share via


TableProperties Classe

Définition

Propriétés de la table.

Cette classe est disponible dans Office 2007 et versions ultérieures.

Lorsque l’objet est sérialisé au format xml, son nom qualifié est w :tblPr.

[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableStyle))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableOverlap))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.BiDiVisual))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableWidth))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableJustification))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellSpacing))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableIndentation))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableBorders))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLayout))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMarginDefault))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLook))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCaption), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableDescription), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePropertiesChange))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]
[DocumentFormat.OpenXml.SchemaAttr(23, "tblPr")]
public class TableProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
public class TableProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr(23, "tblPr")]
public class TableProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("w:tblPr")]
public class TableProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.SchemaAttr("w:tblPr")]
public class TableProperties : DocumentFormat.OpenXml.TypedOpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableStyle))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableOverlap))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.BiDiVisual))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableWidth))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableJustification))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellSpacing))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableIndentation))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableBorders))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLayout))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMarginDefault))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLook))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCaption), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableDescription), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePropertiesChange))]
public class TableProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableStyle))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableOverlap))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.BiDiVisual))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableWidth))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableJustification))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellSpacing))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableIndentation))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableBorders))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLayout))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMarginDefault))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLook))]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCaption), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableDescription), DocumentFormat.OpenXml.FileFormatVersions.Office2010)]
[DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePropertiesChange))]
[DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)]
public class TableProperties : DocumentFormat.OpenXml.OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableStyle))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableOverlap))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.BiDiVisual))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableWidth))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableJustification))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellSpacing))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableIndentation))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableBorders))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLayout))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMarginDefault))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLook))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCaption), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableDescription), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePropertiesChange))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]
[<DocumentFormat.OpenXml.SchemaAttr(23, "tblPr")>]
type TableProperties = class
    inherit OpenXmlCompositeElement
type TableProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr(23, "tblPr")>]
type TableProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("w:tblPr")>]
type TableProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.SchemaAttr("w:tblPr")>]
type TableProperties = class
    inherit TypedOpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableStyle))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableOverlap))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.BiDiVisual))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableWidth))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableJustification))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellSpacing))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableIndentation))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableBorders))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLayout))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMarginDefault))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLook))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCaption), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableDescription), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePropertiesChange))>]
type TableProperties = class
    inherit OpenXmlCompositeElement
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableStyle))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePositionProperties))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableOverlap))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.BiDiVisual))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableWidth))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableJustification))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellSpacing))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableIndentation))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableBorders))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.Shading))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLayout))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCellMarginDefault))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableLook))>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableCaption), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TableDescription), DocumentFormat.OpenXml.FileFormatVersions.Office2010)>]
[<DocumentFormat.OpenXml.ChildElementInfo(typeof(DocumentFormat.OpenXml.Wordprocessing.TablePropertiesChange))>]
[<DocumentFormat.OpenXml.OfficeAvailability(DocumentFormat.OpenXml.FileFormatVersions.Office2007)>]
type TableProperties = class
    inherit OpenXmlCompositeElement
Public Class TableProperties
Inherits OpenXmlCompositeElement
Public Class TableProperties
Inherits TypedOpenXmlCompositeElement
Héritage
Héritage
Attributs

Exemples

L’exemple de code suivant utilise la TableProperties classe pour créer une table et spécifier ses informations de bordure.

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

namespace TablePropertiesEx  
{  
    class Program  
    {  
        // Insert a table into an existing word processing document.  
        static void Main(string[] args)  
        {  
            string fileName = @"C:\users\public\documents\TablePropertiesEx.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 tableProperties = new TableProperties(  
                    new TableBorders(new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Birds), Size = 24 },  
                        new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.Birds), Size = 24 },  
                        new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Birds), Size = 24 },  
                        new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.Birds), Size = 24 },  
                        new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Birds), Size = 24 },  
                        new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Birds), Size = 24 })  
                );  

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

                // 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);  

                Console.WriteLine("The table has been created.\nPress a key.");  
                Console.ReadKey();  
            }  
        }  
    }  
}  
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\TablePropertiesEx.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 tableProperties As New TableProperties(New TableBorders(New TopBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Birds), _  
             .Size = 24 _  
            }, New BottomBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Birds), _  
             .Size = 24 _  
            }, New LeftBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Birds), _  
             .Size = 24 _  
            }, New RightBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Birds), _  
             .Size = 24 _  
            }, New InsideHorizontalBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Birds), _  
             .Size = 24 _  
            }, New InsideVerticalBorder() With { _  
             .Val = New EnumValue(Of BorderValues)(BorderValues.Birds), _  
             .Size = 24 _  
            }))  

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

            ' 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)  

            Console.WriteLine("The table has been created." & vbLf & "Press a key.")  
            Console.ReadKey()  
        End Using  
    End Sub  
End Module  

Remarques

[ISO/IEC 29500-1 1st Edition]

tblPr (Propriétés de la table)

Cet élément spécifie l’ensemble des propriétés à l’échelle de la table appliquées à la table actuelle. Ces propriétés affectent l’apparence de toutes les lignes et cellules de la table parente, mais peuvent être remplacées par des propriétés individuelles au niveau du tableau, des lignes et des propriétés au niveau de la cellule telles que définies par chaque propriété.

[Exemple : Considérez le tableau WordprocessingML simple suivant :

Ce tableau définit une bordure unique à un point pour tous les types de bordures et est défini sur 100 % de la largeur de page, les deux propriétés à l’échelle du tableau. Le tableau obtenu est représenté par le wordprocessingML suivant :

<w:tbl>  
  <w:tblPr>  
    <w:tblW w:w="0" w:type="auto"/>  
    <w:tblBorders>  
      <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>  
      <w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>  
      <w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>  
      <w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>  
      <w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>  
      <w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>  
    </w:tblBorders>  
  </w:tblPr>  
  …</w:tbl>  

Dans cet exemple, l’élément tblW (§17.4.64) définit la largeur totale de la table, qui, dans ce cas, est définie sur un type de auto, qui spécifie que la table doit être dimensionnée automatiquement pour s’adapter à son contenu. L’élément tblBorders (§17.4.39) spécifie chacune des bordures de la table et spécifie une bordure d’un point en haut, gauche, bas, droite et à l’intérieur des bordures horizontales et verticales. Fin de l’exemple]

Éléments parents
tbl (§17.4.38)
Éléments enfants Paragraphe
bidiVisual (table visuellement de droite à gauche) §17.4.1
jc (Alignement de la table) §17.4.29
shd (ombrage de table) §17.4.32
tblBorders (Bordures de table) §17.4.39
tblCaption (légende de table) §17.4.41
tblCellMar (marge de cellule de table par défaut) §17.4.43
tblCellSpacing (Espacement des cellules de table par défaut) §17.4.46
tblDescription (Description de la table) §17.4.47
tblInd (retrait de table à partir de la marge de début) §17.4.51
tblLayout (Disposition de tableau) §17.4.53
tblLook (Paramètres de mise en forme conditionnelle du style de tableau) §17.4.56
tblOverlap (La table flottante permet à d’autres tables de se chevaucher) §17.4.57
tblpPr (positionnement de table flottante) §17.4.58
tblPrChange (Informations de révision pour les propriétés de table) §17.13.5.34
tblStyle (Style de tableau référencé) §17.4.63
tblStyleColBandSize (Nombre de colonnes dans la bande de colonnes) §17.7.6.5
tblStyleRowBandSize (Nombre de lignes dans la bande de lignes) §17.7.6.7
tblW (largeur de table préférée) §17.4.64

[Remarque : La définition de schéma XML W3C du modèle de contenu de cet élément (CT_TblPr) se trouve dans §A.1. Fin de la remarque]

ISO/IEC29500 : 2008.

Constructeurs

TableProperties()

Initialise une nouvelle instance de la classe TableProperties.

TableProperties(IEnumerable<OpenXmlElement>)

Initialise une nouvelle instance de la classe TableProperties avec les éléments enfants spécifiés.

TableProperties(OpenXmlElement[])

Initialise une nouvelle instance de la classe TableProperties avec les éléments enfants spécifiés.

TableProperties(String)

Initialise une nouvelle instance de la classe TableProperties à partir du code XML externe.

Propriétés

BiDiVisual

BiDiVisual.

Représente la balise d’élément suivante dans le schéma : w :bidiVisual.

ChildElements

Obtient tous les nœuds enfants de l’élément actuel.

(Hérité de OpenXmlElement)
ExtendedAttributes

Obtient tous les attributs étendus (attributs non définis dans le schéma) de l’élément actuel.

(Hérité de OpenXmlElement)
Features

Obtient un IFeatureCollection pour l’élément actuel. Cette collection de fonctionnalités sera en lecture seule, mais héritera des fonctionnalités de sa partie parente et de son package, le cas échéant.

(Hérité de OpenXmlElement)
FirstChild

Obtient le premier enfant de l’élément OpenXmlElement actuel.

(Hérité de OpenXmlCompositeElement)
HasAttributes

Obtient une valeur indiquant si l’élément actuel a des attributs.

(Hérité de OpenXmlElement)
HasChildren

Obtient une valeur qui indique si l’élément actuel a des éléments enfants.

(Hérité de OpenXmlCompositeElement)
InnerText

Obtient ou définit les valeurs concaténées du nœud actuel et de tous ses enfants.

(Hérité de OpenXmlCompositeElement)
InnerXml

Obtient ou définit le balisage qui représente uniquement les nœuds enfants du nœud actuel.

(Hérité de OpenXmlCompositeElement)
LastChild

Obtient le dernier enfant de l’élément OpenXmlElement actuel. Retourne null (Nothing en Visual Basic) s’il n’existe aucun élément OpenXmlElement de ce type.

(Hérité de OpenXmlCompositeElement)
LocalName

Propriétés de la table.

Cette classe est disponible dans Office 2007 et versions ultérieures.

Lorsque l’objet est sérialisé au format xml, son nom qualifié est w :tblPr.

LocalName

Obtient le nom local de l’élément actuel.

(Hérité de OpenXmlElement)
MCAttributes

Obtient ou définit les attributs de compatibilité du balisage. Retourne null si aucun attribut de compatibilité de balisage n’est défini pour l’élément actuel.

(Hérité de OpenXmlElement)
NamespaceDeclarations

Obtient toutes les déclarations d’espace de noms définies dans l’élément actuel. Retourne un énumérateur vide s’il n’y a pas de déclaration d’espace de noms.

(Hérité de OpenXmlElement)
NamespaceUri

Obtient l’URI d’espace de noms de l’élément actuel.

(Hérité de OpenXmlElement)
OpenXmlElementContext

Obtient l’élément OpenXmlElementContext de l’élément actuel.

(Hérité de OpenXmlElement)
OuterXml

Obtient le balisage qui représente l’élément actuel et tous ses éléments enfants.

(Hérité de OpenXmlElement)
Parent

Obtient l’élément parent de l’élément actuel.

(Hérité de OpenXmlElement)
Prefix

Obtient le préfixe d’espace de noms de l’élément actuel.

(Hérité de OpenXmlElement)
Shading

Trame de fond.

Représente la balise d’élément suivante dans le schéma : w :shd.

TableBorders

TableBorders.

Représente la balise d’élément suivante dans le schéma : w :tblBorders.

TableCaption

TableCaption, cette propriété est disponible uniquement dans Office 2010 et versions ultérieures.

Représente la balise d’élément suivante dans le schéma : w :tblCaption.

TableCellMarginDefault

Tablecellmargindefault.

Représente la balise d’élément suivante dans le schéma : w :tblCellMar.

TableCellSpacing

TableCellSpacing.

Représente la balise d’élément suivante dans le schéma : w :tblCellSpacing.

TableDescription

TableDescription, cette propriété est disponible uniquement dans Office 2010 et versions ultérieures.

Représente la balise d’élément suivante dans le schéma : w :tblDescription.

TableIndentation

TableIndentation.

Représente la balise d’élément suivante dans le schéma : w :tblInd.

TableJustification

TableJustification.

Représente la balise d’élément suivante dans le schéma : w :jc.

TableLayout

TableLayout.

Représente la balise d’élément suivante dans le schéma : w :tblLayout.

TableLook

TableLook.

Représente la balise d’élément suivante dans le schéma : w :tblLook.

TableOverlap

TableOverlap.

Représente la balise d’élément suivante dans le schéma : w :tblOverlap.

TablePositionProperties

TablePositionProperties.

Représente la balise d’élément suivante dans le schéma : w :tblpPr.

TablePropertiesChange

Informations de révision pour les propriétés de table.

Représente la balise d’élément suivante dans le schéma : w :tblPrChange.

TableStyle

Tablestyle.

Représente la balise d’élément suivante dans le schéma : w :tblStyle.

TableWidth

TableWidth.

Représente la balise d’élément suivante dans le schéma : w :tblW.

XmlQualifiedName

Obtient le nom qualifié de l’élément actuel.

(Hérité de OpenXmlElement)
XName

Obtient le nom qualifié de l’élément actuel.

(Hérité de OpenXmlElement)

Méthodes

AddAnnotation(Object)

Ajoute un objet à la liste d’annotations de l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
AddChild(OpenXmlElement, Boolean)

Ajoute l’élément spécifié à l’élément s’il s’agit d’un enfant connu. Cela ajoute l’élément à l’emplacement approprié en fonction du schéma.

(Hérité de OpenXmlCompositeElement)
AddNamespaceDeclaration(String, String)

Ajoute une déclaration d’espace de noms au nœud actuel.

(Hérité de OpenXmlElement)
Ancestors()

Énumère tous les ancêtres de l’élément actuel.

(Hérité de OpenXmlElement)
Ancestors<T>()

Énumère uniquement les ancêtres de l’élément actuel qui ont le type spécifié.

(Hérité de OpenXmlElement)
Annotation(Type)

Obtenez le premier objet d’annotation du type spécifié à partir de l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
Annotation<T>()

Obtenez le premier objet d’annotation du type spécifié à partir de l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
Annotations(Type)

Obtient une collection d’annotations avec le type spécifié pour l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
Annotations<T>()

Obtient une collection d’annotations avec le type spécifié pour l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
Append(IEnumerable<OpenXmlElement>)

Ajoute chaque élément d’une liste d’éléments à la fin de la liste des éléments enfants de l’élément actuel.

(Hérité de OpenXmlElement)
Append(OpenXmlElement[])

Ajoute chaque élément d’un tableau d’éléments à la fin de la liste des éléments enfants de l’élément actuel.

(Hérité de OpenXmlElement)
AppendChild<T>(T)

Ajoute l’élément spécifié à la fin de la liste des nœuds enfants de l’élément actuel.

(Hérité de OpenXmlCompositeElement)
ClearAllAttributes()

Efface tous les attributs, y compris les attributs connus et les attributs étendus.

(Hérité de OpenXmlElement)
Clone()

Crée un doublon du nœud actuel.

(Hérité de OpenXmlElement)
CloneNode(Boolean)

Crée un doublon de ce nœud.

Descendants()

Énumère tous les descendants de l’élément actuel.

(Hérité de OpenXmlElement)
Descendants<T>()

Énumérez tous les descendants de l’élément actuel de type T.

(Hérité de OpenXmlElement)
Elements()

Énumère tous les enfants de l’élément actuel.

(Hérité de OpenXmlElement)
Elements<T>()

Énumère uniquement les enfants de l’élément actuel qui ont le type spécifié.

(Hérité de OpenXmlElement)
ElementsAfter()

Énumère tous les éléments frères qui suivent l’élément actuel et ont le même parent que l’élément actuel.

(Hérité de OpenXmlElement)
ElementsBefore()

Énumère tous les éléments frères qui précèdent l’élément actuel et ont le même parent que l’élément actuel.

(Hérité de OpenXmlElement)
GetAttribute(String, String)

Obtient un attribut Open XML avec le nom de balise et l’URI d’espace de noms spécifiés.

(Hérité de OpenXmlElement)
GetAttributes()

Obtient une liste qui contient une copie de tous les attributs.

(Hérité de OpenXmlElement)
GetEnumerator()

Retourne un énumérateur qui itère au sein de la collection enfant.

(Hérité de OpenXmlElement)
GetFirstChild<T>()

Recherche le premier élément enfant de type T.

(Hérité de OpenXmlElement)
InsertAfter<T>(T, OpenXmlElement)

Insère l’élément spécifié immédiatement après l’élément de référence spécifié.

(Hérité de OpenXmlCompositeElement)
InsertAfterSelf<T>(T)

Insère l’élément spécifié immédiatement après l’élément actuel.

(Hérité de OpenXmlElement)
InsertAt<T>(T, Int32)

Insère l’élément spécifié à l’index spécifié des enfants de l’élément actuel.

(Hérité de OpenXmlCompositeElement)
InsertBefore<T>(T, OpenXmlElement)

Insère l’élément spécifié juste avant l’élément de référence spécifié.

(Hérité de OpenXmlCompositeElement)
InsertBeforeSelf<T>(T)

Insère l’élément spécifié juste avant l’élément actuel.

(Hérité de OpenXmlElement)
IsAfter(OpenXmlElement)

Détermine si l’élément actuel apparaît après un élément spécifié dans l’ordre du document.

(Hérité de OpenXmlElement)
IsBefore(OpenXmlElement)

Détermine si l’élément actuel apparaît avant un élément spécifié dans l’ordre du document.

(Hérité de OpenXmlElement)
LookupNamespace(String)

Résout le préfixe d’espace de noms dans le contexte du nœud actuel.

(Hérité de OpenXmlElement)
LookupPrefix(String)

Recherche le préfixe correspondant pour un URI d’espace de noms dans l’étendue de l’élément actuel.

(Hérité de OpenXmlElement)
NextSibling()

Obtient l’élément OpenXmlElement qui suit immédiatement l’élément OpenXmlElement actuel. Retourne null (Nothing en Visual Basic) s’il n’existe aucun élément OpenXmlElement suivant.

(Hérité de OpenXmlElement)
NextSibling<T>()

Obtient l’élément OpenXmlElement avec le type spécifié qui suit l’élément OpenXmlElement actuel. Retourne null (Nothing en Visual Basic) s’il n’y a pas d’élément OpenXmlElement suivant.

(Hérité de OpenXmlElement)
PrependChild<T>(T)

Insère l’élément spécifié au début de la liste des nœuds enfants de l’élément actuel.

(Hérité de OpenXmlCompositeElement)
PreviousSibling()

Obtient l’élément OpenXmlElement qui précède immédiatement l’élément OpenXmlElement actuel. Retourne null (Nothing en Visual Basic ) s’il n’existe aucun élément OpenXmlElement précédent.

(Hérité de OpenXmlElement)
PreviousSibling<T>()

Obtient l’élément OpenXmlElement avec le type spécifié qui précède l’élément OpenXmlElement actuel. Retourne null (Nothing en Visual Basic) s’il n’existe aucun élément OpenXmlElement précédent.

(Hérité de OpenXmlElement)
Remove()

Supprime l’élément actuel de son parent.

(Hérité de OpenXmlElement)
RemoveAllChildren()

Supprime tous les éléments enfants de l’élément actuel.

(Hérité de OpenXmlCompositeElement)
RemoveAllChildren<T>()

Supprimez tous les éléments enfants de l’élément actuel qui sont de type T.

(Hérité de OpenXmlElement)
RemoveAnnotations(Type)

Supprime les annotations du type spécifié de l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
RemoveAnnotations<T>()

Supprime les annotations avec le type spécifié de l’élément OpenXmlElement actuel.

(Hérité de OpenXmlElement)
RemoveAttribute(String, String)

Supprime l’attribut de l’élément actuel.

(Hérité de OpenXmlElement)
RemoveChild<T>(T)

Supprime l’élément enfant spécifié.

(Hérité de OpenXmlCompositeElement)
RemoveNamespaceDeclaration(String)

Supprime la déclaration d’espace de noms pour le préfixe spécifié. Ne supprime rien s’il n’y a pas de préfixe.

(Hérité de OpenXmlElement)
ReplaceChild<T>(OpenXmlElement, T)

Remplace l’un des éléments enfants de l’élément actuel par un autre élément OpenXmlElement.

(Hérité de OpenXmlCompositeElement)
SetAttribute(OpenXmlAttribute)

Définit un attribut sur l’élément spécifié. Si l’attribut est un attribut connu, la valeur de l’attribut est définie. Si l’attribut est un attribut étendu, l’attribut « openxmlAttribute » est ajouté à la liste des attributs étendus.

(Hérité de OpenXmlElement)
SetAttributes(IEnumerable<OpenXmlAttribute>)

Définit un certain nombre d’attributs à l’élément . Si un attribut est un attribut connu, la valeur de l’attribut est définie. Si un attribut est un attribut étendu, l’attribut « openxmlAttribute » est ajouté à la liste des attributs étendus.

(Hérité de OpenXmlElement)
WriteTo(XmlWriter)

Enregistre le nœud actuel dans le XmlWriter spécifié.

(Hérité de OpenXmlElement)

Implémentations d’interfaces explicites

IEnumerable.GetEnumerator()

Propriétés de la table.

Cette classe est disponible dans Office 2007 et versions ultérieures.

Lorsque l’objet est sérialisé au format xml, son nom qualifié est w :tblPr.

(Hérité de OpenXmlElement)
IEnumerable<OpenXmlElement>.GetEnumerator()

Retourne un énumérateur qui itère au sein de la collection enfant.

(Hérité de OpenXmlElement)

S’applique à