In EPPlus 3.1, even if a cell did not have a value, the styles for the cell could be set.
However, in EPPlus 4 beta, the styles are not persisted.
The following code demonstrates the difference in versions 3.1 and 4.0:
```
var filename = Path.Combine(Path.GetTempPath(), "test.xlsx");
if(File.Exists(filename)) File.Delete(filename);
using(var ep = new ExcelPackage(new FileInfo(filename)))
{
var workbook = ep.Workbook;
var style = workbook.Styles.CreateNamedStyle("test");
style.Style.Fill.PatternType = ExcelFillStyle.Solid;
style.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(79, 129, 189));
style.Style.Border.Bottom.Style = ExcelBorderStyle.Thick;
var worksheet = workbook.Worksheets.Add("Sheet1");
worksheet.Column(1).Width = 50;
worksheet.Cells["A1"].Value = "Where no values have been set";
worksheet.Cells["A3"].Value = "Where the first value is set";
worksheet.Cells["A5"].Value = "Where all values are set";
worksheet.Cells["A7"].Value = "Where the first value is set and the cells merged";
worksheet.Cells[1, 2, 1, 4].StyleName = "test";
worksheet.Cells[3, 2].Value = String.Empty;
worksheet.Cells[3, 2, 3, 4].StyleName = "test";
worksheet.Cells[5, 2, 5, 4].Value = String.Empty;
worksheet.Cells[5, 2, 5, 4].StyleName = "test";
worksheet.Cells[7, 2].Value = String.Empty;
worksheet.Cells[7, 2, 7, 4].StyleName = "test";
worksheet.Cells[7, 2, 7, 4].Merge = true;
ep.Save();
}
Process.Start(filename);
```
test.xlsx attached is the output from version 4. From version 3.1, all four rows look the same.