I am writing a web query for Excel 2007 to extract data from a database application via a web server that
we have full control over. If the requested page is not available, the web server generates an HTML "Data not available"
page, but the web query appears to only be capable of:
- displaying the generic "Unable to open (URL). Cannot
download the information you requested" message
- displaying the "This Web query returned no data. To change the query, ..." message
- inserting the text of the error page into the spreadsheet (not desirable)
What I am ideally looking for is a
piece of HTML (like the
redirection tag) that the server
can return that will cause Excel to suppress the standard error messages, and if possible display our own one. If this is
achievable at the server end that would be perfect, but a solution involving some VBA at the Excel end would be
I've looked around for such a feature but found the documentation for the family of tags the
redirection one was taken from badly lacking. I've also checked through the archive- there appear to be a number of
questions about suppressing the first error message I mentioned, for various reasons. Apologies if that part of the question
has already been answered, there were a lot of threads just entitled "web query" and I might have missed the odd one- if it
has then just a link would be great.
Thanks for your help!