Поделиться через


SheetFormatProperties Class

Sheet Format Properties.When the object is serialized out as xml, its qualified name is x:sheetFormatPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Spreadsheet.SheetFormatProperties

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class SheetFormatProperties _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As SheetFormatProperties
public class SheetFormatProperties : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

18.3.1.81 sheetFormatPr (Sheet Format Properties)

Sheet formatting properties.

Parent Elements

dialogsheet (§18.3.1.34); worksheet (§18.3.1.99)

Attributes

Description

baseColWidth (Base Column Width)

Specifies the number of characters of the maximum digit width of the normal style's font. This value does not include margin padding or extra padding for gridlines. It is only the number of characters.

See defaultColWidth description in this section for details on calculating this value.

See the col element description, particularly the width attribute description, for more information on what is meant by "maximum digit width".

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

customHeight (Custom Height)

'True' if defaultRowHeight value has been manually set, or is different from the default value.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

defaultColWidth (Default Column Width)

Default column width measured as the number of characters of the maximum digit width of the normal style's font.

If the user has not set this manually, then it can be calculated:

defaultColWidth = baseColumnWidth + {margin padding (2 pixels on each side, totalling 4 pixels)} + {gridline (1pixel)}

If the user has set this manually, then there is no calculation, and simply a value is specified.

The possible values for this attribute are defined by the W3C XML Schema double datatype.

defaultRowHeight (Default Row Height)

Default row height measured in point size. Optimization so we don't have to write the height on all rows. This can be written out if most rows have custom height, to achieve the optimization.

When the row height of all rows in a sheet is the default value, then that value is written here, and customHeight is not set. If a few rows have a different height, that information is written directly on each row. However, if most or all of the rows in the sheet have the same height, but that height isn't the default height, then that height value should be written here (as an optimization), and the customHeight flag should also be set. In this case, all rows having this height do not need to express the height, only rows whose height differs from this value need to be explicitly expressed.

The possible values for this attribute are defined by the W3C XML Schema double datatype.

outlineLevelCol (Column Outline Level)

Highest number of outline levels for columns in this sheet. These values shall be in synch with the actual sheet outline levels.

The possible values for this attribute are defined by the W3C XML Schema unsignedByte datatype.

outlineLevelRow (Maximum Outline Row)

Highest number of outline level for rows in this sheet. These values shall be in synch with the actual sheet outline levels.

The possible values for this attribute are defined by the W3C XML Schema unsignedByte datatype.

thickBottom (Thick Bottom Border)

'True' if rows have a thick bottom border by default.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

thickTop (Thick Top Border)

'True' if rows have a thick top border by default.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

zeroHeight (Hidden By Default)

'True' if rows are hidden by default. This setting is an optimization used when most rows of the sheet are hidden. In this case, instead of writing out every row and specifying hidden, it is much shorter to only write out the rows that are not hidden, and specify here that rows are hidden by default, and only not hidden if specified.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_SheetFormatPr) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SheetFormatProperties Members

DocumentFormat.OpenXml.Spreadsheet Namespace