Macrosheet Class

Defines the Macrosheet Class. It is the root element of MacroSheetPart.When the object is serialized out as xml, its qualified name is xne:macrosheet.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.OpenXmlPartRootElement
        DocumentFormat.OpenXml.Office.Excel.Macrosheet

Namespace:  DocumentFormat.OpenXml.Office.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(DataConsolidate))> _
<ChildElementInfoAttribute(GetType(AutoFilter))> _
<ChildElementInfoAttribute(GetType(SheetProperties))> _
<ChildElementInfoAttribute(GetType(CustomSheetViews))> _
<ChildElementInfoAttribute(GetType(PhoneticProperties))> _
<ChildElementInfoAttribute(GetType(ConditionalFormatting))> _
<ChildElementInfoAttribute(GetType(PrintOptions))> _
<ChildElementInfoAttribute(GetType(PageMargins))> _
<ChildElementInfoAttribute(GetType(PageSetup))> _
<ChildElementInfoAttribute(GetType(HeaderFooter))> _
<ChildElementInfoAttribute(GetType(RowBreaks))> _
<ChildElementInfoAttribute(GetType(ColumnBreaks))> _
<ChildElementInfoAttribute(GetType(CustomProperties))> _
<ChildElementInfoAttribute(GetType(Drawing))> _
<ChildElementInfoAttribute(GetType(LegacyDrawing))> _
<ChildElementInfoAttribute(GetType(LegacyDrawingHeaderFooter))> _
<ChildElementInfoAttribute(GetType(Picture))> _
<ChildElementInfoAttribute(GetType(OleObjects))> _
<ChildElementInfoAttribute(GetType(DrawingHeaderFooter), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(SortState))> _
<ChildElementInfoAttribute(GetType(SheetDimension))> _
<ChildElementInfoAttribute(GetType(SheetViews))> _
<ChildElementInfoAttribute(GetType(SheetFormatProperties))> _
<ChildElementInfoAttribute(GetType(Columns))> _
<ChildElementInfoAttribute(GetType(SheetData))> _
<ChildElementInfoAttribute(GetType(SheetProtection))> _
Public Class Macrosheet _
    Inherits OpenXmlPartRootElement
'Usage
Dim instance As Macrosheet
[ChildElementInfoAttribute(typeof(DataConsolidate))]
[ChildElementInfoAttribute(typeof(AutoFilter))]
[ChildElementInfoAttribute(typeof(SheetProperties))]
[ChildElementInfoAttribute(typeof(CustomSheetViews))]
[ChildElementInfoAttribute(typeof(PhoneticProperties))]
[ChildElementInfoAttribute(typeof(ConditionalFormatting))]
[ChildElementInfoAttribute(typeof(PrintOptions))]
[ChildElementInfoAttribute(typeof(PageMargins))]
[ChildElementInfoAttribute(typeof(PageSetup))]
[ChildElementInfoAttribute(typeof(HeaderFooter))]
[ChildElementInfoAttribute(typeof(RowBreaks))]
[ChildElementInfoAttribute(typeof(ColumnBreaks))]
[ChildElementInfoAttribute(typeof(CustomProperties))]
[ChildElementInfoAttribute(typeof(Drawing))]
[ChildElementInfoAttribute(typeof(LegacyDrawing))]
[ChildElementInfoAttribute(typeof(LegacyDrawingHeaderFooter))]
[ChildElementInfoAttribute(typeof(Picture))]
[ChildElementInfoAttribute(typeof(OleObjects))]
[ChildElementInfoAttribute(typeof(DrawingHeaderFooter), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(SortState))]
[ChildElementInfoAttribute(typeof(SheetDimension))]
[ChildElementInfoAttribute(typeof(SheetViews))]
[ChildElementInfoAttribute(typeof(SheetFormatProperties))]
[ChildElementInfoAttribute(typeof(Columns))]
[ChildElementInfoAttribute(typeof(SheetData))]
[ChildElementInfoAttribute(typeof(SheetProtection))]
public class Macrosheet : OpenXmlPartRootElement

Remarks

The following table lists the possible child types:

  • DocumentFormat.OpenXml.Spreadsheet.SheetProperties <x:sheetPr>

  • DocumentFormat.OpenXml.Spreadsheet.SheetDimension <x:dimension>

  • DocumentFormat.OpenXml.Spreadsheet.SheetViews <x:sheetViews>

  • DocumentFormat.OpenXml.Spreadsheet.SheetFormatProperties <x:sheetFormatPr>

  • DocumentFormat.OpenXml.Spreadsheet.Columns <x:cols>

  • DocumentFormat.OpenXml.Spreadsheet.SheetData <x:sheetData>

  • DocumentFormat.OpenXml.Spreadsheet.SheetProtection <x:sheetProtection>

  • DocumentFormat.OpenXml.Spreadsheet.AutoFilter <x:autoFilter>

  • DocumentFormat.OpenXml.Spreadsheet.SortState <x:sortState>

  • DocumentFormat.OpenXml.Spreadsheet.DataConsolidate <x:dataConsolidate>

  • DocumentFormat.OpenXml.Spreadsheet.CustomSheetViews <x:customSheetViews>

  • DocumentFormat.OpenXml.Spreadsheet.PhoneticProperties <x:phoneticPr>

  • DocumentFormat.OpenXml.Spreadsheet.ConditionalFormatting <x:conditionalFormatting>

  • DocumentFormat.OpenXml.Spreadsheet.PrintOptions <x:printOptions>

  • DocumentFormat.OpenXml.Spreadsheet.PageMargins <x:pageMargins>

  • DocumentFormat.OpenXml.Spreadsheet.PageSetup <x:pageSetup>

  • DocumentFormat.OpenXml.Spreadsheet.HeaderFooter <x:headerFooter>

  • DocumentFormat.OpenXml.Spreadsheet.RowBreaks <x:rowBreaks>

  • DocumentFormat.OpenXml.Spreadsheet.ColumnBreaks <x:colBreaks>

  • DocumentFormat.OpenXml.Spreadsheet.CustomProperties <x:customProperties>

  • DocumentFormat.OpenXml.Spreadsheet.Drawing <x:drawing>

  • DocumentFormat.OpenXml.Spreadsheet.LegacyDrawing <x:legacyDrawing>

  • DocumentFormat.OpenXml.Spreadsheet.LegacyDrawingHeaderFooter <x:legacyDrawingHF>

  • DocumentFormat.OpenXml.Spreadsheet.Picture <x:picture>

  • DocumentFormat.OpenXml.Spreadsheet.OleObjects <x:oleObjects>

  • DocumentFormat.OpenXml.Spreadsheet.DrawingHeaderFooter <x:drawingHF>

  • DocumentFormat.OpenXml.Spreadsheet.ExtensionList <x:extLst>

2.2.2.1 macrosheet

Target namespace: https://schemas.microsoft.com/office/excel/2006/main

A CT_Worksheet element that specifies a macro sheet.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment defines the contents of this element.

<xsd:element name="macrosheet" type="CT_Worksheet"/>

2.2.4.1 CT_Worksheet

Target namespace: https://schemas.microsoft.com/office/excel/2006/main

Referenced by: macrosheet

A complex type that specifies properties for a macro sheet.

Child Elements:

sheetPr : A CT_SheetPr ([ECMA-376] Part 4, Annex A) element that specifies sheet-level properties.

dimension : A CT_SheetDimension ([ECMA-376] Part 4, Annex A) element that specifies the used range of the worksheet.

sheetViews : A CT_SheetViews ([ECMA-376] Part 4, Annex A) element that specifies sheet view information.

sheetFormatPr : A CT_SheetFormatPr ([ECMA-376] Part 4, Annex A) element that specifies sheet formatting properties.

cols : A CT_Cols ([ECMA-376] Part 4, Annex A) element that specifies information about whole columns of the worksheet.

sheetData : A CT_SheetData ([ECMA-376] Part 4, Annex A) element that specifies the Worksheet ([ECMA-376] Part 4, Section 3.3) cell table.

sheetCalcPr : This element MUST be ignored in a macro sheet.

sheetProtection : A CT_SheetProtection ([ECMA-376] Part 4, Annex A) element that specifies sheet protection options.

protectedRanges : This element MUST be ignored in a macro sheet.

scenarios : This element MUST be ignored in a macro sheet.

autoFilter : A CT_AutoFilter ([ECMA-376] Part 4, Annex A) element that specifies AutoFilter settings.

sortState : A CT_SortState ([ECMA-376] Part 4, Annex A) element that specifies the different sort conditions that apply to a range.

dataConsolidate : A CT_DataConsolidate ([ECMA-376] Part 4, Annex A) element that specifies data consolidation settings.

customSheetViews : A CT_CustomSheetViews ([ECMA-376] Part 4, Annex A) element that specifies custom sheet views.

mergeCells : This element MUST be ignored in a macro sheet.

phoneticPr : A CT_PhoneticPr ([ECMA-376] Part 4, Annex A) element that specifies default phonetic information.

conditionalFormatting : A CT_ConditionalFormatting ([ECMA-376] Part 4, Annex A) element that specifies conditional formatting rules.

dataValidations : This element MUST be ignored in a macro sheet.

hyperlinks : This element MUST be ignored in a macro sheet.

printOptions : A CT_PrintOptions ([ECMA-376] Part 4, Annex A) element that specifies print options for the sheet.

pageMargins : A CT_PageMargins ([ECMA-376] Part 4, Annex A) element that specifies page margins for the sheet.

pageSetup : A CT_PageSetup ([ECMA-376] Part 4, Annex A) element that specifies page setup settings for the sheet.

headerFooter : A CT_HeaderFooter ([ECMA-376] Part 4, Annex A) element that specifies header and footer settings.

rowBreaks : A CT_PageBreak ([ECMA-376] Part 4, Annex A) element that specifies horizontal page break (2) information.

colBreaks : A CT_PageBreak ([ECMA-376] Part 4, Annex A) element that specifies vertical page break (2) information.

customProperties : A CT_CustomProperties ([ECMA-376] Part 4, Annex A) element that specifies references to binary parts containing arbitrary user-defined data.

cellWatches : This element MUST be ignored in a macro sheet.

ignoredErrors : This element MUST be ignored in a macro sheet.

smartTags : This element MUST be ignored in a macro sheet.

drawing : A CT_Drawing ([ECMA-376] Part 4, Annex A) element that specifies a reference to a drawing part ([ECMA-376] Part 1, Section 12.3.8) containing one or more drawing ([ECMA-376] Part 4, Section 5.6) elements.

picture : A CT_SheetBackgroundPicture ([ECMA-376] Part 4, Annex A) element that specifies a background image of a sheet.

oleObjects : A CT_OleObjects ([ECMA-376] Part 4, Annex A) element that specifies embedded objects in the sheet.

controls : This element MUST be ignored in a macro sheet.

webPublishItems : A CT_WebPublishItems ([ECMA-376] Part 4, Annex A) element that specifies individual objects that have been published to HTML.

tableParts : A CT_TableParts ([ECMA-376] Part 4, Annex A) element that specifies references to parts specifying every table on the sheet.

extLst : A CT_ExtensionList ([ECMA-376] Part 4, Annex A) element that specifies future extensions to this format.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment defines the contents of this complex type.

<xsd:complexType name="CT_Worksheet">

<xsd:sequence>

<xsd:element name="sheetPr" type="x:CT_SheetPr" minOccurs="0" maxOccurs="1"/>

<xsd:element name="dimension" type="x:CT_SheetDimension" minOccurs="0" maxOccurs="1"/>

<xsd:element name="sheetViews" type="x:CT_SheetViews" minOccurs="0" maxOccurs="1"/>

<xsd:element name="sheetFormatPr" type="x:CT_SheetFormatPr" minOccurs="0" maxOccurs="1"/>

<xsd:element name="cols" type="x:CT_Cols" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element name="sheetData" type="x:CT_SheetData" minOccurs="1" maxOccurs="1"/>

<xsd:element name="sheetCalcPr" type="x:CT_SheetCalcPr" minOccurs="0" maxOccurs="1"/>

<xsd:element name="sheetProtection" type="x:CT_SheetProtection" minOccurs="0" maxOccurs="1"/>

<xsd:element name="protectedRanges" type="x:CT_ProtectedRanges" minOccurs="0" maxOccurs="1"/>

<xsd:element name="scenarios" type="x:CT_Scenarios" minOccurs="0" maxOccurs="1"/>

<xsd:element name="autoFilter" type="x:CT_AutoFilter" minOccurs="0" maxOccurs="1"/>

<xsd:element name="sortState" type="x:CT_SortState" minOccurs="0" maxOccurs="1"/>

<xsd:element name="dataConsolidate" type="x:CT_DataConsolidate" minOccurs="0" maxOccurs="1"/>

<xsd:element name="customSheetViews" type="x:CT_CustomSheetViews" minOccurs="0" maxOccurs="1"/>

<xsd:element name="mergeCells" type="x:CT_MergeCells" minOccurs="0" maxOccurs="1"/>

<xsd:element name="phoneticPr" type="x:CT_PhoneticPr" minOccurs="0" maxOccurs="1"/>

<xsd:element name="conditionalFormatting" type="x:CT_ConditionalFormatting" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element name="dataValidations" type="x:CT_DataValidations" minOccurs="0" maxOccurs="1"/>

<xsd:element name="hyperlinks" type="x:CT_Hyperlinks" minOccurs="0" maxOccurs="1"/>

<xsd:element name="printOptions" type="x:CT_PrintOptions" minOccurs="0" maxOccurs="1"/>

<xsd:element name="pageMargins" type="x:CT_PageMargins" minOccurs="0" maxOccurs="1"/>

<xsd:element name="pageSetup" type="x:CT_PageSetup" minOccurs="0" maxOccurs="1"/>

<xsd:element name="headerFooter" type="x:CT_HeaderFooter" minOccurs="0" maxOccurs="1"/>

<xsd:element name="rowBreaks" type="x:CT_PageBreak" minOccurs="0" maxOccurs="1"/>

<xsd:element name="colBreaks" type="x:CT_PageBreak" minOccurs="0" maxOccurs="1"/>

<xsd:element name="customProperties" type="x:CT_CustomProperties" minOccurs="0" maxOccurs="1"/>

<xsd:element name="cellWatches" type="x:CT_CellWatches" minOccurs="0" maxOccurs="1"/>

<xsd:element name="ignoredErrors" type="x:CT_IgnoredErrors" minOccurs="0" maxOccurs="1"/>

<xsd:element name="smartTags" type="x:CT_SmartTags" minOccurs="0" maxOccurs="1"/>

<xsd:element name="drawing" type="x:CT_Drawing" minOccurs="0" maxOccurs="1"/>

<xsd:element name="picture" type="x:CT_SheetBackgroundPicture" minOccurs="0" maxOccurs="1"/>

<xsd:element name="oleObjects" type="x:CT_OleObjects" minOccurs="0" maxOccurs="1"/>

<xsd:element name="controls" type="x:CT_Controls" minOccurs="0" maxOccurs="1"/>

<xsd:element name="webPublishItems" type="x:CT_WebPublishItems" minOccurs="0" maxOccurs="1"/>

<xsd:element name="tableParts" type="x:CT_TableParts" minOccurs="0" maxOccurs="1"/>

<xsd:element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1"/>

</xsd:sequence>

</xsd:complexType>

2.2.3.1 macrosheet

Target namespace: https://schemas.microsoft.com/office/excel/2006/main

A CT_Worksheet element that specifies a macro sheet.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment defines the contents of this element.

<xsd:element name="macrosheet" type="CT_Worksheet"/>

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

Macrosheet Members

DocumentFormat.OpenXml.Office.Excel Namespace