I have a question regarding Excel errors.
In our application, we register a set of add-in functions using Excel-DNA. In some cases, we accept Excel errors as arguments and/or return an Excel error as the result of a function call.
This all works fine with the "classic" set of 8 Excel errors (including
#GETTING_DATA). These errors, along with their internal Excel codes, are listed in the Excel-DNA class
ExcelDna.Integration.ExcelError (
here).
The internal codes for the classic Excel errors are mostly given by Microsoft's documentation
here. (These are separate from the type codes returned by the Excel function
ERROR.TYPE().)
The error codes for the new error types are listed unofficially
here (not guaranteed to be identical between the various Excel APIs, but in practice I think they are). However, these errors don't behave exactly like the classic errors and it doesn't seem to be possible to read or write these errors via the C API (based on testing with a C++ add-in which doesn't use Excel-DNA).
A similar question, specifically regarding
#SPILL! errors, was raised several years ago on this forum
here.
These errors (especially
#SPILL!) are becoming more and more prevalent with newer native Excel functions, so it's a significant gap if they can't be used with add-in functions via the C API. This is especially true if Microsoft intend to add further Excel error types, such as
#PYTHON/
#PYTHON! (their documentation is inconsistent on the exact text of this one).
So, in short: I am wondering whether there has been any update from Microsoft on adding support for the newer error types in the C API, or whether there is any channel of communication through which this could be raised?
(As a side note, these errors
can be detected via COM via their integer codes (yet a third numerical code for the same error!) - for example,
#CALC! is -
2146826238.)