I\'m having a little problem when I generate an Excel file from a template, using the EPPlus library. The file has a first spreadsheet that contains data that is used for po
Different setup (returning a stream), but same problem (corrupted table record). In my case the problem was the explicit call to ExcelPackage.Save():
using (var excelPackage = new ExcelPackage())
{
/* ... removed code for clarity */
// caused the stream to contain the file 2 times,
// save is already called by GetAsByteArray()
//excelPackage.Save();
return new MemoryStream(excelPackage.GetAsByteArray());
}