简体   繁体   English

为什么Web Query在Microsoft Excel 2010中不突出显示我的表?

[英]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. 我希望使用Excel的Web查询功能为用户提供不断变化的数据集的访问权限。

Why not ODBC straight to the database? 为什么不直接使用ODBC到数据库? 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. 为避免授予用户各种级别的复杂ODBC访问权限,并避免对这些用户进行培训,使他们了解如何使用ODBC来访问所需的数据,我想我将创建一个简单的Web应用程序,以纯HTML格式输出用户所需的数据表。

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? 标记HTML表以与Excel的Web查询工具兼容时,是否必须使用特定设置?

I compared my code with the code of another webpage where the tables were highlighting properly in Web Query. 我将代码与另一个网页的代码进行了比较,在该网页中,表在Web查询中正确突出显示。 Through some trial and error, I found the problem. 通过反复试验,我发现了问题所在。

In the <head> section of my webpage, I had the following meta tag. 在网页的<head>部分中,我具有以下元标记。

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

Turns out when this is included, the Web Query table selecting option breaks. 事实证明,包括在内时,Web查询表选择选项会中断。 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. 基于消失的Bootstrap圆角,我猜Web Query正在使用某种IE兼容模式,而上面的meta标签打破了它。

Excel Web查询窗口

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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