Epplus: How to apply a style from the Excel Style Gallery to an ExcelRange
<p>The screenshot shows a scenario for a dataset exported by Epplus to a fresh Excel file (file type *.xlsx).</p>

<p>In this scenario, I'd like to apply the "Bad" Style in the Excel Style Gallery to Cell E1. How could I do this programatically in Epplus?</p>

<p><a href="https://i.stack.imgur.com/mJt2t.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mJt2t.png" alt="Screenshot of example scenario"></a></p>

<p>I have looked through the instructional documents I was able to find, <a href="https://epplus.codeplex.com/wikipage?title=FAQ" rel="noreferrer">here</a> and <a href="https://epplus.codeplex.com/wikipage?title=ContentSheetExample" rel="noreferrer">here</a>. I have not yet found an example showing how to apply an Excel style from the Style Gallery to an Excel Range.</p>

<p>Here is what I have so far.</p>

<pre><code>private void FormatDataTable(ExcelWorksheet worksheet)
{            
    if(RowCount==0) 
    {
        // How do I apply the "Bad" style to this range?
        var range = worksheet.Cells["E1"];      
    }
}
</code></pre>