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


SheetProperties Class

Worksheet Properties.When the object is serialized out as xml, its qualified name is x:sheetPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.SheetProperties

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(TabColor))> _
<ChildElementInfoAttribute(GetType(OutlineProperties))> _
<ChildElementInfoAttribute(GetType(PageSetupProperties))> _
Public Class SheetProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As SheetProperties
[ChildElementInfoAttribute(typeof(TabColor))]
[ChildElementInfoAttribute(typeof(OutlineProperties))]
[ChildElementInfoAttribute(typeof(PageSetupProperties))]
public class SheetProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • TabColor <x:tabColor>

  • OutlineProperties <x:outlinePr>

  • PageSetupProperties <x:pageSetUpPr>

[ISO/IEC 29500-1 1st Edition]

18.3.1.82 sheetPr (Sheet Properties)

Sheet-level properties.

Parent Elements

dialogsheet (§18.3.1.34); worksheet (§18.3.1.99)

Child Elements

Subclause

outlinePr (Outline Properties)

§18.3.1.61

pageSetUpPr (Page Setup Properties)

§18.3.1.65

tabColor (Sheet Tab Color)

§18.3.1.93

Attributes

Description

codeName (Code Name)

Specifies a stable name of the sheet, which should not change over time, and does not change from user input. This name should be used by code to reference a particular sheet.

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

enableFormatConditionsCalculation (Enable Conditional Formatting Calculations)

Flag indicating whether the conditional formatting calculations shall be evaluated. If set to false, then the min/max values of color scales or databars or threshold values in Top N rules shall not be updated. Essentially the conditional formatting "calc" is off.

This is useful when conditional formats are being set programmatically at runtime, recalculation of the conditional formatting does not need to be done until the program execution has finished setting all the conditional formatting properties.

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

filterMode (Filter Mode)

Flag indicating whether the worksheet has one or more autofilters or advanced filters on.

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

published (Published)

Flag indicating whether the worksheet is published.

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

syncHorizontal (Synch Horizontal)

Flag indicating whether this worksheet is horizontally synced to the synchRef anchor point. When true and scroll location is missing from the window properties, the window view shall be scrolled to the horizontal (row) aspect of the synchRef value.

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

syncRef (Synch Reference)

Anchor point for worksheet's window.

The possible values for this attribute are defined by the ST_Ref simple type (§18.18.62).

syncVertical (Synch Vertical)

Flag indicating whether this worksheet is vertically synced to the synchRef anchor point. When true and scroll location is missing from the window properties, the window view shall be scrolled to the vertical (column) aspect of the synchRef value.

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

transitionEntry (Transition Formula Entry)

Flag indicating whether the Transition Formula Entry (Lotus compatibility) option is enabled.

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

transitionEvaluation (Transition Formula Evaluation)

Flag indicating whether the Transition Formula Evaluation (Lotus compatibility) option is enabled.

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

SheetProperties Members

DocumentFormat.OpenXml.Spreadsheet Namespace