EPPlus custom header column names
<p>I have following code, which generate me an excel with header row. The column names of header are named as variables in DataItem class.</p>

<pre><code>// class for single row item
    public class DataItem
    {
        public int Number { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Country { get; set; }
    }

    // Retrive data items from database and store into conllection.
    var rows = database.GetData().ToList();

    // Create table from collection with automatic header
    ws.Cells["A1"].LoadFromCollection(rows, true, TableStyles.Medium25);
</code></pre>

<p>excel header output :</p>

<pre><code>Number | FirstName | LastName | Country
</code></pre>

<p>How my output can be customized for example (spaces added etc.):</p>

<pre><code>Number | First Name | Last Name | Country
</code></pre>