文章出處

  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

  用法很簡單,兩步足矣!

  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前端效果展示的童鞋現在有福了!!


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()