<p>I am new to <a href="https://epplus.codeplex.com/" rel="noopener nofollow ugc">epplus</a>, and i’m trying to read some values from an excel table.</p>
<p>This is what I have so far:</p>
<pre><code class="lang-auto">var fileInfo = new FileInfo(filename);
using(var excelPackage = new OfficeOpenXml.ExcelPackage(fileInfo))
{
foreach (var sheet in excelPackage.Workbook.Worksheets)
{
foreach (ExcelTable table in sheet.Tables)
{
foreach(var row in table.Rows) // <-- !!
{ ... }
}
}
}
</code></pre>
<p>However, now I am stumped, as the <code>ExcelTable</code> only has a <code>Columns</code> property, but not a <code>Rows</code> property as I had expected. I cannot find a <code>Rows</code> property on any object in the library.</p>
<p><strong>How do I iterate through a table, reading Row for Row?</strong></p>
<hr>
<p><em>Source : <a href="https://epplus.codeplex.com/" rel="noopener nofollow ugc">Stack Overflow</a>,)</em></p>