None of the other answers quite got me there (the Excel worksheet was always empty), but this worked for me:
using (var package = new ExcelPackage())
{
var worksheet = package.Workbook.Worksheets.Add("Worksheet Name");
worksheet.Cells["A1"].LoadFromCollection(data);
var stream = new MemoryStream(package.GetAsByteArray());
}