Description
I just opened a feature request, #3, requesting support for data validations.
As something else for considersation, I was wondering what you thought about permitting access to the active ClosedXML worksheet from an ExcelWriter? The motivation here would be to allow access to the full range of ClosedXML Excel-writing features, even if ExcelWriter hasn't (or hasn't yet) added support for such features within it's own API (such as data validations from #3).
using (var excel = new ExcelWriter(stream))
{
// Returns ExcelWriter._sheet
var worksheet = excel.GetWorksheet();
}
There is of course a risk that users would try to access the worksheet after the ExcelWriter
has been disposed, but I'd consider this an "advanced" feature that users would only use for things not yet supported by ExcelWriter. I personally consider the risk small, and not different to any other faced when using streams, but I guess you could the method something like DangerousGetWorksheet
if you see it differently.
Thanks again for this great library 😃