Class ExcelPowerQuerySettings¶
Namespace: OfficeOpenXml.Data.Connection
Assembly: EPPlus.dll
Settings for power query connections. These settings are read from the CustomXml in the package with the key DataMashup
Inheritance¶
object ← ExcelPowerQuerySettings
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
CultureCode¶
The culture code used to set parse numbers and dates
Property Value¶
Exists¶
If any power query settings exists in the package. Create"/>
Property Value¶
Formulas¶
The plain-text document that contains the Power Query Formula for each query in the spreadsheet.
It is fully specified by [MSDOCS - MLANG] except for the following special rules:
- Only a single section is allowed and MUST be named “Section1”.
- Section member names MUST NOT contain periods, double quotes, tabs, leading/trailing whitespace, or line/carriage returns.Also, they MUST NOT be blank or consist only of whitespace
- All section members SHOULD be shared.
Property Value¶
MetadataItems¶
A collection of meta data items to describe the power query formulas.
Property Value¶
List<ExcelPowerQueryMetadataItem>
MetadataXml¶
Metadata settings for the Power Query connection. See MS-QDEFF - 2.5.1
Property Value¶
XmlDocument
Permissions¶
Permission settings
Property Value¶
Methods¶
Create()¶
Create the DataMashup xml used for power query setting in the CustomXml. This will initialize the PermissionsXml, MetadataXml and Formulas properties with empty settings. This enables the possibility to add power query connections to the workbook (provider=Microsoft.Mashup.OleDb.1). Power query connections requires the M formula to be set in the Formulas under Section1 and meta data to be created in the MetadataXml.
LoadMetadataXml(string)¶
Loads meta data from a xml document formatted according to the MS-QDEFF docmument - section 2.5.1. See also MetadataXml
Parameters¶
xml string
The xml document
Exceptions¶
If the xml fails to load or does not contain any items.