export to Excel from a list with EPPLUS
<p>i´m trying to export a list to Excel in c# with EPPLUS, when i execute the program don´t give me errors, but when i open the Excel i see that are not the correct data, he put the name of the projet+the name of the object as many times as objects have the list:
<a href="https://i.stack.imgur.com/7Cvj2.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/7Cvj2.jpg" alt="enter image description here"></a></p>

<p>The code of the object:</p>

<pre><code>class Stock
        {
            public string Nif;
            public string Proveedor;
            public string Coodigo;
            public string descripcion;
            public string Catalogo;
            public string Estadistico;
            public decimal StockOn;

        }
</code></pre>

<p>and when thes list(lstStock) is filled i create an Excel and use the option loadfromcollection  :</p>

<pre><code>        System.IO.FileInfo f = new System.IO.FileInfo("D:\\stock_termos.xlsx");
            if (f.Exists) f.Delete();
            using (ExcelPackage ep = new ExcelPackage(f))
            {   
                ExcelWorksheet hoja = ep.Workbook.Worksheets.Add("TOTAL OBSOLETOS");
                hoja.Cells[1, 1].Value = "NIF"; ;
                hoja.Cells[1, 2].Value = "Proveedor";
                hoja.Cells[1, 3].Value = "Código";
                hoja.Cells[1, 4].Value = "Descripción";
                hoja.Cells[1, 5].Value = "Catálogo";
                hoja.Cells[1, 6].Value = "Cod.Estadístico";
                hoja.Cells[1, 7].Value = "Stock On";
                hoja.Cells[2, 1].LoadFromCollection(lstStock);
            }
</code></pre>

<p>The cuestión is that when i debug the aplication in VisualStudio i can see the list is correctly filled:</p>

<p><a href="https://i.stack.imgur.com/TVsJf.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/TVsJf.jpg" alt="enter image description here"></a></p>

<p>So i think the error is when i try to export the data to Excel, with the LoadFromCollection method, but i can´t se what is wrong, please help.</p>