Excel Services Interactive View introduced Microsoft's new capability of adding interactive view to any table on a web page. Excel Services Interactive View -- Single table showed how to do so with a webpage containing a single table. Excel Services Interactive View -- Multiple tables showed how to handle multiple tables on the same page.
For those familiar with HTML coding, the 'a' tag used for the Interactive View 'button' is a standard tag and one can modify it as desired. Below, I use the style attribute to have the 'a' tag float to the left of the table and I also added more information about what is shown to the consumer in the interactive view.
<a style="float:left;margin:10px" href="#" name="MicrosoftExcelButton"
data-xl-tableTitle="2012 Olympics top medal contenders as of August
5, 2012"
data-xl-buttonStyle="Standard" data-xl-fileName="Book1"
data-xl-attribution="2012 Olympics Aug 5 medal contenders from TM Consulting">
Excel Interactive
button</a>
Excel Interactive button
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | China (CHN) | 29 | 16 | 14 | 59 |
2 | United States (USA) | 27 | 14 | 15 | 56 |
3 | Great Britain (GBR) | 16 | 10 | 10 | 36 |
4 | South Korea (KOR) | 10 | 4 | 7 | 21 |
5 | France (FRA) | 8 | 7 | 9 | 24 |
6 | Germany (GER) | 5 | 10 | 6 | 21 |
7 | Italy (ITA) | 5 | 5 | 3 | 13 |
8 | Kazakhstan (KAZ) | 5 | 0 | 0 | 5 |
9 | North Korea (PRK) | 4 | 0 | 1 | 5 |
10 | Russia (RUS) | 3 | 16 | 14 | 33 |
Table 1 -- Top medal contenders as of August 5, 2012
(ranked by gold medal count)
Microsoft documents the various attributes added by it to the 'a' tag to support custom features of the Interactive View. This information is at http://msdn.microsoft.com/en-us/library/sharepoint/jj220062(v=office.15).
Unfortunately, the two most useful capabilities are not explored in that document.
The first we saw above. The 'a' tag is just another HTML tag and it can be styled and modified as required.
The second is the data-xl-dataTableID attribute introduced by Microsoft. By default, the interactive view button uses the data in the table that follows the button in the page layout. The data-xl-dataTableID attribute allows the designer to change the default behavior and connect the interactive view button with a specific table in the web page.
Below are two standard Interactive View buttons located adjacent to each other. The first button uses the data in Table 2 and the 2nd button uses the data from Table 3.
<a style="margin:10px" href="#" name="MicrosoftExcelButton"
data-xl-dataTableID="Table2"
data-xl-tableTitle="Top 10 2012 Olympic medal count (ranked
by gold medal count)"
data-xl-buttonStyle="standard" data-xl-fileName="Book2"
data-xl-attribution="Top 10 2012 Olympic medal count from TM
Consulting">
Top 10 2012 Olympic medal count</a>
<a style="margin:10px" href="#" name="MicrosoftExcelButton"
data-xl-dataTableID="Table3"
data-xl-tableTitle="Top 10 all-time Olympic medal count
(ranked by gold medal count)"
data-xl-buttonStyle="standard" data-xl-fileName="Book2"
data-xl-attribution="Top 10 all-time Olympic medal count from
TM Consulting">
Top 10 all-time Olympic medal count</a>
Top 10 2012 Olympic medal count Top 10 all-time Olympic medal count
Rank | NOC | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | United States (USA) | 46 | 29 | 29 | 104 |
2 | China (CHN) | 38 | 27 | 22 | 87 |
3 | Great Britain (GBR) | 29 | 17 | 19 | 65 |
4 | Russia (RUS) | 24 | 25 | 34 | 83 |
5 | South Korea (KOR) | 13 | 8 | 7 | 28 |
6 | Germany (GER) | 11 | 19 | 14 | 44 |
7 | France (FRA) | 11 | 11 | 12 | 34 |
8 | Italy (ITA) | 8 | 9 | 11 | 28 |
9 | Hungary (HUN) | 8 | 4 | 5 | 17 |
10 | Australia (AUS) | 7 | 16 | 12 | 35 |
Table 2 -- Top medal count at the end of the 2012 Olympics
(ranked by gold medal count)
Rank | Team (IOC code) | Gold | Silver | Bronze | Total |
1 | United States (USA) | 975 | 758 | 667 | 2400 |
2 | Soviet Union (URS) | 395 | 319 | 296 | 1010 |
3 | Germany (GER) | 258 | 303 | 334 | 895 |
4 | Great Britain (GBR) | 236 | 272 | 272 | 780 |
5 | France (FRA) | 203 | 223 | 246 | 672 |
6 | China (CHN) | 201 | 144 | 127 | 472 |
7 | Italy (ITA) | 199 | 166 | 185 | 550 |
8 | Hungary | 167 | 145 | 164 | 476 |
9 | East Germany (GDR) | 153 | 129 | 127 | 409 |
10 | Sweden (SWE) | 143 | 164 | 176 | 483 |
Table 3 -- Total medal count for all Olympics
(ranked by gold medal count)
Extended documentation at http://msdn.microsoft.com/en-us/library/sharepoint/jj220062(v=office.15)