I found the following code in a codebase I'm working on:
WorkbookPart workbookPart = spreadsheetDocument.WorkbookPart;
if (workbookPart == null)
{
// perform some action
}
I'm a bit confused as to when and under what conditions a WorkbookPart could ever be null. I looked at the relevant portion of the docs but fond nothing regarding this.
When can a WorkbookPart ever be null?