I am trying to delete Excel sheet via C++ code but randomly it fails. Here is the code:
HRESULT hr = AutoWrap(DISPATCH_METHOD, NULL, pXlSheet, L"Delete", 0);
This function returns S_OK
even delete sheet failed but the sheet isn't deleted from the workbook.
Note: The system gives error sound, if delete sheet failed.