# C1.C1Excel.C1XLBook.Progress

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_C1Excel_C1XLBook_Progress" data-uid="C1.C1Excel.C1XLBook.Progress" class="text-break">Progress Event
</h1>
<div class="markdown level0 summary"><p>Fired while data is being read from or written into a workbook.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Excel.html">C1.C1Excel</a></h6>
<h6><strong>Assembly</strong>: C1.C1Excel.4.8.dll</h6>
<h5 id="C1_C1Excel_C1XLBook_Progress_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event XLProgressEventHandler Progress</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Event Progress As XLProgressEventHandler</code></pre>
</div>
<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="C1.C1Excel.XLProgressEventHandler.html">XLProgressEventHandler</a></td>
      <td>Fired while data is being read from or written into a workbook.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Excel_C1XLBook_Progress_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>This event is typically used to update the application UI during lengthy
operations. It can also be used to cancel the operations.</p>
</div>
<h5 id="C1_C1Excel_C1XLBook_Progress_examples"><strong>Examples</strong></h5>
<p>The code below writes messages to the output window while the application
Excel files.</p>
<pre><code class="lang-csharp">void Load()
{
	// create workbook
	C1XLBook book = new C1XLBook();

	// progress event handler
	book.Progress += new XLProgressEventHandler(load_Progress);

	// load workbook
	book.Load(xlFileName);
}

// print messages while workbook are loaded
void load_Progress(object sender, XLProgressEventArgs e)
{
	Console.WriteLine("Loading {0}, {1:p0} done",
		e.FileName, e.Position/(float)e.FileLength);
}</code></pre>

</div>
