Why is Web Query not highlighting my table in Micr

2019-08-20 17:45发布

问题:

I am looking to use Excel's Web Query feature to give users access to constantly changing datasets.

Why not ODBC straight to the database? Well, there are several databases on several servers that I'm dealing with. To avoid granting users varying levels of complicated ODBC access, and to avoid then training those users on how to use ODBC to access the data they need, I thought I'd create a simple web app that outputs the data the users need in clean HTML tables.

After creating the pages though, I'm having the following problem.

The little yellow selection arrow is only appearing in the top-left corner of the page, and not alongside each table. If I import using the top-left selection arrow, the entire page is imported when I only really want the "Output" table.

Are there specific settings that must be used when marking up an HTML table to be compatible with Excel's Web Query tool?

回答1:

I compared my code with the code of another webpage where the tables were highlighting properly in Web Query. Through some trial and error, I found the problem.

In the <head> section of my webpage, I had the following meta tag.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

Turns out when this is included, the Web Query table selecting option breaks. Based on the disappearing Bootstrap rounded corners, I'm guessing Web Query is using some sort of IE Compatibility Mode, and the above meta tag breaks it.