Excel Interactive View - 让页面表格的功能更强大MS Office Excel Services提供了一个非常强大的功能,允许你只需要在页面上添加非常少量的JS references,就可以让你在页面上将表格的内容以Excel图表的方式呈现。这里是MSDN对Excel Interactive View功能的介绍:
Excel Interactive View是一项新技术,它由Excel Services提供一个功能强大的服务,能将页面上的HTML表格即时生成Excel视图,并同时提供一些页面交互功能。
这里是MSDN地址:http://msdn.microsoft.com/library/office/jj163261(v=office.15)
废话不多说,先看看实际效果吧!
Rank
Movie
Wknd
Gross
Wks
1
The Hunger Games
$58.6M
$248M
2
2
Wrath of the Titans
$33.50M
$33.50M
1
3
Mirror Mirror
$18.1M
$18.1M
1
4
21 Jump Street
$14.8M
$92.9M
3
5
Dr. Seuss' The Lorax
$7.78M
$189M
5
6
John Carter
$2.03M
$66.2M
4
7
Salmon Fishing in the Yemen
$1.27M
$3.17M
4
8
Act of Valor
$1M
$67.7M
6
9
A Thousand Words
$.903M
$16.5M
4
10
Journey 2
$.810M
$98.4M
8
Box office data supplied by and copyright Exhibitor Relations © 2012
用法很简单,两步足矣!
1. 将下面的代码copy到你想要添加Excel Interactive View的table之前。注意是在HTML源代码中,直接copy到table前面。
<a href="#" name="MicrosoftExcelButton" data-xl-tableTitle="" data-xl-buttonStyle="Standard" data-xl-fileName="Book1" data-xl-attribution="" ></a>
2. 将下面的JS reference添加到</body>之前。事实证明不一定非得是</body>之前,任何有效的位置均可。
<script type="text/javascript" src="http://r.office.microsoft.com/r/rlidExcelButton?v=1&kip=1"></script>
想做Excel前端效果展示的童鞋现在有福了!!