简体   繁体   中英

Why is Web Query not highlighting my table in Microsoft Excel 2010?

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.

Excel Web查询窗口

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?

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.

Excel Web查询窗口

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM