How to delete a sheet which contains a defined-name?
There is relationship between the sheet and defined names. We should operate on one sheet each time, remove a sheet and update all localSheetId values of remaining worksheet scoped definedName, then go to next one, which will ensure the whole spreadsheet document’s validity. For more detailed information, please refer to: forum discussion thread. Open XML SDK is based on low level DOM. Low level DOM is xml centric, especially comparing to the client OM. So many functions in the App OM cannot be achieved using the SDK easily, for example: inserting a row into a spreadsheet requires the code to re-index all the cells and correct the references in the formulas, etc. The same operation could be easily done through the Excel OM.