问题
What is the proper way to delete an invalid binding in ExcelJS?
If a binding exists on a Excel table and the table is deleted the binding becomes invalid. One can load the bindings again (on a button click for example) and the invalid binding will be loaded:
context.workbook.bindings.load('id'); ...
However, any attempt to do anything with the binding (delete it) causes an InvalidBinding exception. There appears to be no way to tell if a binding is valid or not (it only has id and type properties).
So the question is, once an invalid binding occurs how does one get rid of it so that subsequent loads of the bindings only load valid one's?
Cheers,
Dave
来源:https://stackoverflow.com/questions/45586251/invalid-excel-binding-object