# GrapeCity.Spreadsheet.IWorkbook.UpdateLink

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_" data-uid="GrapeCity.Spreadsheet.IWorkbook.UpdateLink*">UpdateLink Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_" data-uid="GrapeCity.Spreadsheet.IWorkbook.UpdateLink*"></a>
<h4 id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_System_String_System_Func_GrapeCity_Spreadsheet_IWorkbook_System_String_GrapeCity_Spreadsheet_IWorksheet__" data-uid="GrapeCity.Spreadsheet.IWorkbook.UpdateLink(System.String,System.Func{GrapeCity.Spreadsheet.IWorkbook,System.String,GrapeCity.Spreadsheet.IWorksheet})">UpdateLink(string, Func&lt;IWorkbook, string, IWorksheet&gt;)</h4>
<div class="markdown level1 summary"><p>Updates the specified link of this workbook.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool UpdateLink(string name, Func&lt;IWorkbook, string, IWorksheet&gt; missingWorksheetResolver = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function UpdateLink(name As String, Optional missingWorksheetResolver As Func(Of IWorkbook, String, IWorksheet) = Nothing) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>The name of the link to be updated, as returned from the <a class="xref" href="GrapeCity.Spreadsheet.IWorkbook.LinkSources.html#GrapeCity_Spreadsheet_IWorkbook_LinkSources">LinkSources</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;<a class="xref" href="GrapeCity.Spreadsheet.IWorkbook.html">IWorkbook</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="GrapeCity.Spreadsheet.IWorksheet.html">IWorksheet</a>&gt;</td>
      <td><span class="parametername">missingWorksheetResolver</span></td>
      <td><p>The resolver which will be invoked if the reference worksheet is missing.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</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.boolean">bool</a></td>
      <td><p><code>true</code> if the link is updated successfully; otherwise <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_System_String_System_Func_GrapeCity_Spreadsheet_IWorkbook_System_String_GrapeCity_Spreadsheet_IWorksheet___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>When the UpdateLink(string) method is called without any parameters (or <code class="paramref">name</code> is null/empty),
Spread defaults to updating all worksheet links.</p>
</div>


<a id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_" data-uid="GrapeCity.Spreadsheet.IWorkbook.UpdateLink*"></a>
<h4 id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_System_String___System_Func_GrapeCity_Spreadsheet_IWorkbook_System_String_GrapeCity_Spreadsheet_IWorksheet__" data-uid="GrapeCity.Spreadsheet.IWorkbook.UpdateLink(System.String[],System.Func{GrapeCity.Spreadsheet.IWorkbook,System.String,GrapeCity.Spreadsheet.IWorksheet})">UpdateLink(string[], Func&lt;IWorkbook, string, IWorksheet&gt;)</h4>
<div class="markdown level1 summary"><p>Updates one or all links of this workbook.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool UpdateLink(string[] names = null, Func&lt;IWorkbook, string, IWorksheet&gt; missingWorksheetResolver = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function UpdateLink(Optional names As String() = Nothing, Optional missingWorksheetResolver As Func(Of IWorkbook, String, IWorksheet) = Nothing) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</td>
      <td><span class="parametername">names</span></td>
      <td><p>The name of the links to be updated, as returned from the <a class="xref" href="GrapeCity.Spreadsheet.IWorkbook.LinkSources.html#GrapeCity_Spreadsheet_IWorkbook_LinkSources">LinkSources</a>. <code>null</code> is to update all links.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;<a class="xref" href="GrapeCity.Spreadsheet.IWorkbook.html">IWorkbook</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="GrapeCity.Spreadsheet.IWorksheet.html">IWorksheet</a>&gt;</td>
      <td><span class="parametername">missingWorksheetResolver</span></td>
      <td><p>The resolver which will be invoked if the reference worksheet is missing.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</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.boolean">bool</a></td>
      <td><p><code>true</code> if all links are updated successfully; otherwise <code>false</code> if there is at least one link is failed to update.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_IWorkbook_UpdateLink_System_String___System_Func_GrapeCity_Spreadsheet_IWorkbook_System_String_GrapeCity_Spreadsheet_IWorksheet___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>When the UpdateLink(string) method is called without any parameters (or <code class="paramref">name</code> is null/empty),
Spread defaults to updating all worksheet links.</p>
</div>
</div>
