# GrapeCity.Documents.Excel.ICustomXmlPart.Data

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_ICustomXmlPart_Data_" data-uid="GrapeCity.Documents.Excel.ICustomXmlPart.Data*">Data Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_ICustomXmlPart_Data_" data-uid="GrapeCity.Documents.Excel.ICustomXmlPart.Data*"></a>
<h4 id="GrapeCity_Documents_Excel_ICustomXmlPart_Data" data-uid="GrapeCity.Documents.Excel.ICustomXmlPart.Data">Data</h4>
<div class="markdown level1 summary"><p>Gets or sets the raw data stored in the Custom XML part.</p>
<p>
The returned byte array is a copy of the stored data. Modifying the returned array does not
change the content of the Custom XML part. To update the part content, assign this property.
The provided byte array is copied into the Custom XML part and persisted as the XML payload
when the workbook is saved to an OpenXML workbook format.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">byte[] Data { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Property Data As Byte()</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><p>The raw data stored in the Custom XML part.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Excel_ICustomXmlPart_Data_examples">Examples</h5>
<pre><code class="lang-csharp">ICustomXmlPart customXmlPart = workbook.CustomXmlParts.Add();
byte[] xmlData = System.Text.Encoding.UTF8.GetBytes("&lt;settings&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/settings&gt;");
customXmlPart.Data = xmlData;
byte[] storedXmlData = customXmlPart.Data;</code></pre>

</div>
