Simplexcel
Simplexcel copied to clipboard
Implicitly create cell
When i want to do
sheet.Cells["B2"].Bold = true;
this throws a NullReferenceException because the B2 Cell isn't created yet. CellCollection should implicitly create an empty cell.
Two problems: What if I then assign a Cell to B2? Since Cell is created implicitly, CellCollection doesn't have a good way to know if the Cell came from a Cell object or from an implicit creation.
Also, Cell.CellType is immutable. I forgot why, since it only matters on save, so I might change that.
This would require separating the Cell Content, and the Cell Formatting into two separate classes. The CellContent would contain the CellType, Value, and Format, while the CellFormat would include the Font, Border etc.
Maybe doing this in 3.0, where I might break a few things for a better API.
https://github.com/mstum/Simplexcel/issues/43