├── .gitignore ├── Code Editor Proj ├── App.css ├── App.js ├── ExternalDataGitHubManifest.xml ├── Home.html ├── Home.js └── Office.css ├── Excel-Add-in-JS-ExternalDataGitHub.yml ├── LICENSE.txt ├── README-Localized ├── README-de-de.md ├── README-es-es.md ├── README-fr-fr.md ├── README-ja-jp.md ├── README-pt-br.md ├── README-ru-ru.md ├── README-zh-cn.md └── README-zh-tw.md ├── Readme.md ├── Visual Studio Proj ├── Excel-Add-in-JS-ExternalDataGitHub.sln ├── Excel-Add-in-JS-ExternalDataGitHub │ ├── Excel-Add-in-JS-ExternalDataGitHub.csproj │ └── Excel-Add-in-JS-ExternalDataGitHubManifest │ │ ├── Excel-Add-in-JS-ExternalDataGitHub.xml │ │ └── SharePointProjectItem.spdata └── Excel-Add-in-JS-ExternalDataGitHubWeb │ ├── App │ ├── App.css │ ├── App.js │ └── Home │ │ ├── Home.css │ │ ├── Home.html │ │ └── Home.js │ ├── Content │ ├── Office.css │ └── OfficeThemes.css │ ├── Excel-Add-in-JS-ExternalDataGitHubWeb.csproj │ ├── Images │ └── Close.png │ ├── Properties │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config └── images ├── ExternalDataGitHub_data.PNG └── ExternalDataGitHub_taskpane.PNG /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /Code Editor Proj/App.css: -------------------------------------------------------------------------------- 1 | /* Common app styling */ 2 | 3 | #content-header { 4 | background: #2a8dd4; 5 | color: #fff; 6 | position: absolute; 7 | top: 0; 8 | left: 0; 9 | width: 100%; 10 | height: 80px; /* Fixed header height */ 11 | overflow: hidden; /* Disable scrollbars for header */ 12 | } 13 | 14 | #content-main { 15 | background: #fff; 16 | position: fixed; 17 | top: 80px; /* Same value as #content-header's height */ 18 | left: 0; 19 | right: 0; 20 | bottom: 0; 21 | overflow: auto; /* Enable scrollbars within main content section */ 22 | } 23 | 24 | .padding { 25 | padding: 15px; 26 | } 27 | 28 | #notification-message { 29 | background-color: #818285; 30 | color: #fff; 31 | position: absolute; 32 | width: 100%; 33 | min-height: 80px; 34 | right: 0; 35 | z-index: 100; 36 | bottom: 0; 37 | display: none; /* Hidden until invoked */ 38 | } 39 | 40 | #notification-message #notification-message-header { 41 | font-size: medium; 42 | margin-bottom: 10px; 43 | } 44 | 45 | #notification-message #notification-message-close { 46 | background-image: url("../Images/Close.png"); 47 | background-repeat: no-repeat; 48 | width: 24px; 49 | height: 24px; 50 | position: absolute; 51 | right: 5px; 52 | top: 5px; 53 | cursor: pointer; 54 | } 55 | -------------------------------------------------------------------------------- /Code Editor Proj/App.js: -------------------------------------------------------------------------------- 1 | /* Notification functionality */ 2 | 3 | var app = (function () { 4 | "use strict"; 5 | 6 | var app = {}; 7 | 8 | // Common initialization function (to be called from each page) 9 | app.initialize = function () { 10 | $('body').append( 11 | '
' + 12 | '
' + 13 | '
' + 14 | '
' + 15 | '
' + 16 | '
' + 17 | '
'); 18 | 19 | $('#notification-message-close').click(function () { 20 | $('#notification-message').hide(); 21 | }); 22 | 23 | 24 | // After initialization, expose a common notification function 25 | app.showNotification = function (header, text) { 26 | $('#notification-message-header').text(header); 27 | $('#notification-message-body').text(text); 28 | $('#notification-message').slideDown('fast'); 29 | }; 30 | }; 31 | 32 | return app; 33 | })(); -------------------------------------------------------------------------------- /Code Editor Proj/ExternalDataGitHubManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 35a2acfc-9f49-4454-b202-9c55b898625a 9 | 1.0.0.0 10 | Microsoft 11 | en-US 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ReadWriteDocument 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 40 | <Description resid="Contoso.GetStarted.Description"/> 41 | 42 | <!-- Point to a url resource which details how the add-in should be used. --> 43 | <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/> 44 | </GetStarted> 45 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 46 | Think of the FunctionFile as the code behind ExecuteFunction. --> 47 | <FunctionFile resid="Contoso.DesktopFunctionFile.Url" /> 48 | 49 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 50 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 51 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 52 | <OfficeTab id="TabHome"> 53 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 54 | <Group id="Contoso.Group"> 55 | <!-- Label for your group. resid must point to a ShortString resource. --> 56 | <Label resid="Contoso.ExcelAddin" /> 57 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 58 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 59 | <Icon> 60 | <bt:Image size="16" resid="Contoso.tpicon_16x16" /> 61 | <bt:Image size="32" resid="Contoso.tpicon_32x32" /> 62 | <bt:Image size="80" resid="Contoso.tpicon_80x80" /> 63 | </Icon> 64 | 65 | <!-- Control. It can be of type "Button" or "Menu". --> 66 | <Control xsi:type="Button" id="Contoso.TaskpaneButton"> 67 | <Label resid="Contoso.TaskpaneButton.Label" /> 68 | <Supertip> 69 | <!-- ToolTip title. resid must point to a ShortString resource. --> 70 | <Title resid="Contoso.TaskpaneButton.Label" /> 71 | <!-- ToolTip description. resid must point to a LongString resource. --> 72 | <Description resid="Contoso.TaskpaneButton.Tooltip" /> 73 | </Supertip> 74 | <Icon> 75 | <bt:Image size="16" resid="Contoso.tpicon_16x16" /> 76 | <bt:Image size="32" resid="Contoso.tpicon_32x32" /> 77 | <bt:Image size="80" resid="Contoso.tpicon_80x80" /> 78 | </Icon> 79 | 80 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 81 | <Action xsi:type="ShowTaskpane"> 82 | <SourceLocation resid="Contoso.Taskpane.Url"></SourceLocation> 83 | </Action> 84 | </Control> 85 | </Group> 86 | </OfficeTab> 87 | </ExtensionPoint> 88 | </DesktopFormFactor> 89 | </Host> 90 | </Hosts> 91 | 92 | <!-- You can use resources across hosts and form factors. --> 93 | <Resources> 94 | <bt:Images> 95 | <bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://appcommandicons.blob.core.windows.net/images/taskpane_16x.png" /> 96 | <bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://appcommandicons.blob.core.windows.net/images/taskpane_32x.png" /> 97 | <bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://appcommandicons.blob.core.windows.net/images/taskpane_80x.png" /> 98 | </bt:Images> 99 | <bt:Urls> 100 | <bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://yourserver/ExternalDataGitHub/Home.html" /> 101 | <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 102 | </bt:Urls> 103 | <!-- ShortStrings max characters==125. --> 104 | <bt:ShortStrings> 105 | <bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="External Data from GitHub" /> 106 | <bt:String id="Contoso.ExcelAddin" DefaultValue="Excel Add-in" /> 107 | <bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with Excel JS External Data from GitHub." /> 108 | </bt:ShortStrings> 109 | <!-- LongStrings max characters==250. --> 110 | <bt:LongStrings> 111 | <bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to launch the add-in" /> 112 | <bt:String id="Contoso.GetStarted.Description" DefaultValue="Your add-in loaded succesfully. Go to the HOME tab and click the 'External Data from GitHub' button to get started." /> 113 | </bt:LongStrings> 114 | </Resources> 115 | </VersionOverrides> 116 | <!-- End Add-in Commands Mode integration. --> 117 | </OfficeApp> 118 | -------------------------------------------------------------------------------- /Code Editor Proj/Home.html: -------------------------------------------------------------------------------- 1 | <!-- Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 2 | See full license at the bottom of this file. --> 3 | 4 | <!DOCTYPE html> 5 | <html> 6 | <head> 7 | <meta charset="UTF-8" /> 8 | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 9 | <title>External Data GitHub Sample 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 |

Welcome

32 |
33 |
34 |
35 |
36 |

37 | This sample shows how to load data from an external service using the Excel JavaScript API. This 38 | sample uses the public GitHub Search Repositories API 39 | to pull some information about public repositories on GitHub and load that information into the worksheet. 40 |

41 |
42 |

Try it out

43 |

44 | Enter a search keyword and optionaly, a programming language in cells, A2 and B2, and click the button to see a list of the matching public repositories on GitHub. 45 |

46 | 47 |
48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /Code Editor Proj/Home.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 2 | See full license at the bottom of this file. */ 3 | 4 | /// 5 | 6 | (function () { 7 | "use strict"; 8 | 9 | // The initialize function must be run each time a new page is loaded 10 | Office.initialize = function (reason) { 11 | $(document).ready(function () { 12 | app.initialize(); 13 | 14 | // If not using Excel 2016, return 15 | if (!Office.context.requirements.isSetSupported('ExcelApi', '1.1')) { 16 | app.showNotification("Need Office 2016 or greater", "Sorry, this add-in only works with newer versions of Excel."); 17 | return; 18 | } 19 | 20 | // Attach a click event handler for the button 21 | $('#get-repo-info').click(getRepoInfo); 22 | 23 | // Put the default search keyword and language into the active worksheet 24 | // Run a batch operation against the Excel object model 25 | Excel.run(function (ctx) { 26 | 27 | var labels = [["Keyword", "Language"], 28 | ["Excel", "JavaScript"]]; 29 | 30 | // Create a proxy object for the active sheet 31 | var sheet = ctx.workbook.worksheets.getActiveWorksheet(); 32 | 33 | // Queue a command to set the value of the range with keyword and language 34 | sheet.getRange("A1:B2").values = labels; 35 | 36 | // Queue a command to format the header row 37 | sheet.getRange("A1:B1").format.font.bold = true; 38 | 39 | //Run the queued-up commands, and return a promise to indicate task completion 40 | return ctx.sync(); 41 | }) 42 | .catch(function (error) { 43 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 44 | app.showNotification("Error: " + error); 45 | console.log("Error: " + error); 46 | if (error instanceof OfficeExtension.Error) { 47 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 48 | } 49 | }); 50 | }); 51 | }; 52 | 53 | // Click event handler for the button 54 | // Get repo information from GitHub using their public Search API 55 | function getRepoInfo() { 56 | 57 | // Run a batch operation against the Excel object model 58 | Excel.run(function (ctx) { 59 | 60 | // Create a proxy object for the active sheet 61 | var sheet = ctx.workbook.worksheets.getActiveWorksheet(); 62 | 63 | // Create a proxy object for the range that contains the city and state 64 | var range = sheet.getRange("A2:B2"); 65 | 66 | // Queue a command to load the values of the range 67 | range.load("values"); 68 | 69 | // We need to delete output table if it already exists 70 | // Queue a command to load the name property of the table items of the worksheet 71 | sheet.tables.load("name"); 72 | 73 | //Run the queued-up commands, and return a promise to indicate task completion 74 | return ctx.sync().then(function () { 75 | 76 | // Loop through the tables collection to find out if the output table already exists 77 | for (var i = 0; i < sheet.tables.items.length; i++) { 78 | if (sheet.tables.items[i].name == "reposTable") { 79 | sheet.tables.items[i].delete(); 80 | break; 81 | } 82 | } 83 | 84 | // Get the city and state 85 | var keyword = range.values[0][0]; 86 | var language = range.values[0][1]; 87 | 88 | // Create the URL 89 | var requestUrl = "https://api.github.com/search/repositories?q=" + keyword + "+language:" + language + "&sort=stars&order=desc"; 90 | 91 | // Make the AJAX request to the GitHub Search API (https://developer.github.com/v3/search/#search-repositories) 92 | // This API by default returns the first 30 matching repos. If you want additional results, look up the GitHub docs for info 93 | // Note that for unauthenticated requests like this, GitHub API allows you to make up to 10 requests per minute. 94 | $.ajax(requestUrl) 95 | .done(function (data) { 96 | // Write the repo info to the active sheet 97 | writeRepoInfo(data); 98 | }) 99 | .fail(function (jqXHR, textStatus, errorThrown) { 100 | var response = $.parseJSON(jqXHR.responseText); 101 | app.showNotification("Error calling GitHub API", "Error message: " + response.message + ". " 102 | + "For more info, check out: " + response.documentation_url); 103 | console.log(JSON.stringify(jqXHR)); 104 | }); 105 | }) 106 | .then(ctx.sync) 107 | .catch(function (error) { 108 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 109 | app.showNotification("Error: " + error); 110 | console.log("Error: " + error); 111 | if (error instanceof OfficeExtension.Error) { 112 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 113 | } 114 | }); 115 | }) 116 | } 117 | 118 | 119 | // Write the repo info to the active sheet 120 | function writeRepoInfo(repos) { 121 | 122 | // Run a batch operation against the Excel object model 123 | Excel.run(function (ctx) { 124 | 125 | // Create a proxy object for the active sheet 126 | var sheet = ctx.workbook.worksheets.getActiveWorksheet(); 127 | 128 | // Queue a command to add a new table to contain the results 129 | var table = sheet.tables.add('A8:G8', true); 130 | table.name = "reposTable"; 131 | 132 | // Queue a command to get the newly added table 133 | table.getHeaderRowRange().values = [["NAME", "FULL NAME", "URL", "DESCRIPTION", "FORKS_COUNT", "STAR_GAZERS_COUNT", "WATCHERS_COUNT"]]; 134 | 135 | 136 | // Create a proxy object for the table rows 137 | var tableRows = table.rows; 138 | var items = repos.items; 139 | 140 | for (var i in items) { 141 | // Queue commands to add some sample rows to the course table 142 | tableRows.add(null, [[items[i].name, items[i].full_name, items[i].url, items[i].description, items[i].forks_count, items[i].stargazers_count, items[i].watchers_count]]); 143 | } 144 | 145 | //Run the queued-up commands, and return a promise to indicate task completion 146 | return ctx.sync(); 147 | 148 | }) 149 | .catch(function (error) { 150 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 151 | app.showNotification("Error: " + error); 152 | console.log("Error: " + error); 153 | if (error instanceof OfficeExtension.Error) { 154 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 155 | } 156 | }); 157 | } 158 | })(); 159 | 160 | /* 161 | Excel-Add-in-JS-ExternalDataGitHub, https://github.com/OfficeDev/Excel-Add-in-JS-ExternalDataGitHub 162 | 163 | Copyright (c) Microsoft Corporation 164 | 165 | All rights reserved. 166 | 167 | MIT License: 168 | 169 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 170 | associated documentation files (the "Software"), to deal in the Software without restriction, including 171 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 172 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 173 | following conditions: 174 | 175 | The above copyright notice and this permission notice shall be included in all copies or substantial 176 | portions of the Software. 177 | 178 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 179 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 180 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 181 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 182 | USE OR OTHER DEALINGS IN THE SOFTWARE. 183 | */ -------------------------------------------------------------------------------- /Code Editor Proj/Office.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /********************** Office CSS library ***********************/ 3 | /********************** Version: 1.0.2.0 *************************/ 4 | /*****************************************************************/ 5 | 6 | /****************************************************************** 7 | Base 8 | ******************************************************************/ 9 | body { 10 | margin: 0; 11 | padding: 0; 12 | border: 0; 13 | height: 100%; 14 | max-height: 100%; 15 | } 16 | 17 | /****************************************************************** 18 | Typography 19 | ******************************************************************/ 20 | body { 21 | font-family: "Segoe WP", "Segoe UI", "Arial", sans-serif; 22 | font-size: 12px; 23 | color: #262626; 24 | } 25 | 26 | h1 { 27 | font-family: "Segoe WP Light", "Segoe UI", "Arial", sans-serif; 28 | font-size: 22px; 29 | line-height: 26px; 30 | font-weight: 500; 31 | } 32 | 33 | h2, h3, h4, h5, h6, th { 34 | font-family: "Segoe WP Semibold", "Segoe UI", "Arial", sans-serif; 35 | } 36 | 37 | h2 { 38 | font-size: 18px; 39 | line-height: 22px; 40 | font-weight: 600; 41 | } 42 | 43 | h3, h4, h5, h6 { 44 | font-size: 13px; 45 | line-height: 16px; 46 | } 47 | 48 | h3 { 49 | font-weight: 600; 50 | } 51 | 52 | h4, h5, h6 { 53 | font-weight: normal; 54 | } 55 | 56 | form, input, select, button, textarea { 57 | font-family: "Segoe WP", "Segoe UI", "Arial", sans-serif; 58 | font-size: 12px; 59 | line-height: 16px; 60 | } 61 | 62 | /****************************************************************** 63 | General 64 | ******************************************************************/ 65 | a { 66 | color: #336699; 67 | text-decoration: none; 68 | } 69 | 70 | a:focus, a:hover, a:active { 71 | text-decoration: underline; 72 | } 73 | 74 | ul { 75 | margin-left: 1.4em; 76 | padding: 0; 77 | } 78 | 79 | hr { 80 | border: none; 81 | height: 1px; 82 | color: #ebebeb; 83 | background-color: #ebebeb; 84 | clear: both; 85 | } 86 | 87 | img { 88 | border: none; 89 | } 90 | 91 | blockquote { 92 | margin-left: 1.4em; 93 | } 94 | 95 | /****************************************************************** 96 | Forms 97 | ******************************************************************/ 98 | form { 99 | clear: both; 100 | } 101 | 102 | label { 103 | margin-right: 3px; 104 | } 105 | 106 | input, textarea, select, button { 107 | margin: 0 0 5px 0; 108 | padding: 3px; 109 | -webkit-box-sizing: border-box; 110 | -moz-box-sizing: border-box; 111 | box-sizing: border-box; 112 | } 113 | 114 | input[type="checkbox"], input[type="radio"] { 115 | margin-right: 4px; 116 | } 117 | 118 | input[type="checkbox"], input[type="radio"], 119 | input[type="file"], input[type="image"] { 120 | padding: 0; 121 | } 122 | 123 | button, textarea, select, 124 | input:not([type]), 125 | input[type="button"], 126 | input[type="color"], 127 | input[type="date"], 128 | input[type="datetime"], 129 | input[type="datetime-local"], 130 | input[type="email"], 131 | input[type="month"], 132 | input[type="number"], 133 | input[type="password"], 134 | input[type="reset"], 135 | input[type="search"], 136 | input[type="submit"], 137 | input[type="tel"], 138 | input[type="text"], 139 | input[type="time"], 140 | input[type="url"], 141 | input[type="week"] { 142 | border: 1px solid #cccccc; 143 | background-color: white; 144 | } 145 | 146 | button, input[type="button"], 147 | input[type="submit"], input[type="reset"] { 148 | padding-left: 10px; 149 | padding-right: 10px; 150 | text-align: center; 151 | } 152 | 153 | button:hover:enabled, 154 | input[type="button"]:hover:enabled, 155 | input[type="submit"]:hover:enabled, 156 | input[type="reset"]:hover:enabled { 157 | border-color: #7eB4ea; 158 | background-color: #e5f1fc; 159 | } 160 | 161 | button:active:enabled, 162 | input[type="button"]:active:enabled, 163 | input[type="submit"]:active:enabled, 164 | input[type="reset"]:active:enabled { 165 | border-color: #569de5; 166 | background-color: #cee5fc; 167 | } 168 | 169 | /****************************************************************** 170 | Scrollbars 171 | ******************************************************************/ 172 | body { 173 | scrollbar-base-color: white; 174 | scrollbar-arrow-color: #ababab; 175 | scrollbar-highlight-color: #ababab; 176 | scrollbar-darkshadow-color: white; 177 | scrollbar-track-color: white; 178 | scrollbar-face-color: white; 179 | } 180 | -------------------------------------------------------------------------------- /Excel-Add-in-JS-ExternalDataGitHub.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: External Data from GitHub Task Pane Add-in Sample for Excel 2016 4 | path: '' 5 | description: 'This task pane add-in shows how to load data from an external service such as by using the GitHub Search APIs in Excel 2016. It comes in two flavors: code editor and Visual Studio.' 6 | readme: '' 7 | generateZip: FALSE 8 | isLive: TRUE 9 | technologies: 10 | - Office Add-in 11 | azureDeploy: '' 12 | author: umasubra 13 | platforms: [] 14 | languages: 15 | - JavaScript 16 | extensions: 17 | products: 18 | - Excel 19 | scenarios: [] 20 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) Microsoft Corporation 2 | 3 | All rights reserved. 4 | 5 | MIT License: 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README-Localized/README-de-de.md: -------------------------------------------------------------------------------- 1 | # Aufgabenbereich-Add-In-Beispiel für externe Daten aus GitHub für Excel 2016 2 | 3 | _Gilt für: Excel 2016_ 4 | 5 | Dieses Aufgabenbereich-Add-In veranschaulicht, wie Daten aus einem externen Dienst geladen werden, beispielsweise mithilfe der GitHub Search-APIs in Excel 2016. Es ist in zwei Versionen verfügbar: Code-Editor und Visual Studio. 6 | 7 | ![GitHub-Beispiel für externe Daten](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## Probieren Sie es aus 10 | ### Code-Editor-Version 11 | 12 | Am einfachsten können Sie Ihr Add-In bereitstellen und testen, indem Sie die Dateien in eine Netzwerkfreigabe kopieren. 13 | 14 | 1. Hosten Sie die Dateien aus dem Code-Editor-Projekt mithilfe eines Servers Ihrer Wahl. 15 | 2. Bearbeiten Sie die Elemente \ und \ der Manifestdatei so, dass sie auf den gehosteten Speicherort aus Schritt 1 zeigt (z. B. https://localhost/ExternalDataGitHub/Home.html). 16 | 3. Kopieren Sie das Manifest (ExternalDataGitHubManifest.xml) in eine Netzwerkfreigabe (z. B. \\\MyShare\MyManifests). 17 | 4. Fügen Sie den Freigabepfad, unter dem das Manifest enthalten ist, als vertrauenswürdigen App-Katalog in Excel hinzu. 18 | 19 | a. Starten Sie Excel, und öffnen Sie ein leeres Arbeitsblatt. 20 | 21 | b. Klicken Sie auf die Registerkarte **Datei**, und klicken Sie dann auf **Optionen**. 22 | 23 | c. Wählen Sie **Sicherheitscenter** aus, und klicken Sie dann auf die Schaltfläche **Einstellungen für das Sicherheitscenter**. 24 | 25 | d. Klicken Sie auf **Vertrauenswürdige Add-in-Kataloge**. 26 | 27 | e. Geben Sie im Feld **Katalog-URL** den Pfad zu der in Schritt 3 erstellten Netzwerkfreigabe ein, und klicken Sie auf **Katalog hinzufügen**. 28 | 29 | f. Aktivieren Sie das Kontrollkästchen **Im Menü anzeigen**, und wählen Sie dann **OK**. Eine Meldung wird angezeigt, dass Ihre Einstellungen angewendet werden, wenn Office das nächste Mal gestartet wird. 30 | 31 | 5. Testen und führen Sie das Add-In aus. 32 | 33 | a. Klicken Sie auf der Registerkarte **Einfügen** in Excel 2016 auf **Meine-Add-Ins**. 34 | 35 | b. Wählen Sie im Dialogfenster **Office-Add-Ins** die Option **Freigegebener Ordner** aus. 36 | 37 | c. Wählen Sie **GitHub-Beispiel für externe Daten**>**Einfügen**. Das Add-In wird in einem Aufgabenbereich geöffnet, wie in diesem Diagramm dargestellt. 38 | 39 | ![GitHub-Beispiel für externe Daten](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d. Geben Sie einen Suchschlüsselwort und eine Programmiersprache in den Zellen A2 und B2 ein, und klicken Sie auf die Schaltfläche „Repository-Informationen abrufen“, um die Ergebnisse in die Tabelle in dem Arbeitsblatt zu laden, wie im Folgenden dargestellt. 42 | 43 | ![GitHub-Beispiel für externe Daten](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Visual Studio-Version 46 | 1. Kopieren Sie das Projekt in einen lokalen Ordner, und öffnen Sie die Datei „Excel-Add-in-JS-ExternalDataGitHub.sln“ in Visual Studio. 47 | 2. Drücken Sie F5, um das Beispiel-Add-In zu erstellen und bereitzustellen. Excel wird gestartet und das Add-In wird in einem Aufgabenbereich rechts neben einem leeren Arbeitsblatt geöffnet, wie in der folgenden Abbildung dargestellt. 48 | 49 | ![GitHub-Beispiel für externe Daten](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. Geben Sie einen Suchschlüsselwort und eine Programmiersprache in den Zellen A2 und B2 ein, und klicken Sie auf die Schaltfläche „Repository-Informationen abrufen“, um die Ergebnisse in die Tabelle in dem Arbeitsblatt zu laden, wie im Folgenden dargestellt. 52 | 53 | ![GitHub-Beispiel für externe Daten](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### Weitere Informationen 57 | 58 | 1. [Programmierungsübersicht für Excel-Add-Ins](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Codeausschnitt-Explorer für Excel](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Codebeispiele zu Excel-Add-Ins](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [JavaScript-API-Referenz zu Excel-Add-Ins](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [Erstellen Ihres ersten Excel-Add-Ins](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-es-es.md: -------------------------------------------------------------------------------- 1 | # Ejemplo del complemento del panel de tareas de datos externos de GitHub para Excel 2016 2 | 3 | _Se aplica a: Excel 2016_ 4 | 5 | Este complemento del panel de tareas muestra cómo cargar datos de un servicio externo, por ejemplo al usar las API de búsqueda de GitHub de Excel 2016. Hay dos tipos: editor de código y Visual Studio. 6 | 7 | ![Ejemplo de GitHub de datos externos](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## Pruébelo 10 | ### Versión del editor de código 11 | 12 | La forma más sencilla de implementar y probar el complemento consiste en copiar los archivos en un recurso compartido de red. 13 | 14 | 1. Hospede los archivos del proyecto del Editor de código mediante su servidor favorito. 15 | 2. Edite los elementos \ y \ del archivo de manifiesto para que apunte a la ubicación hospedada que creó en el paso 1 (por ejemplo, https://hostlocal/DatosExternosDeGitHub/Home.html). 16 | 3. Copie el manifiesto (ExternalDataGitHubManifest.xml) en un recurso compartido de red (por ejemplo, \\\MiRecursoCompartido\\MisManifiestos). 17 | 4. Agregue la ubicación del recurso compartido que contiene el manifiesto como un catálogo de aplicaciones de confianza en Excel. 18 | 19 | a. Inicie Excel y abra una hoja de cálculo en blanco. 20 | 21 | b. Elija la pestaña **Archivo** y, a continuación, **Opciones**. 22 | 23 | c. Elija **Centro de confianza** y, a continuación, el botón **Configuración del Centro de confianza**. 24 | 25 | d. Elija **Catálogos de complementos de confianza**. 26 | 27 | e. En el cuadro **URL del catálogo**, escriba la ruta de acceso al recurso compartido de red que creó en el paso 3 y, a continuación, elija **Agregar catálogo**. 28 | 29 | f. Active la casilla **Mostrar en el menú** y elija **Aceptar**. Aparecerá un mensaje para informarle de que la configuración se aplicará la próxima vez que inicie Office. 30 | 31 | 5. Pruebe y ejecute el complemento. 32 | 33 | a. En la pestaña **Insertar** de Excel 2016, elija **Mis complementos**. 34 | 35 | b. En el cuadro de diálogo **Complementos de Office**, elija **Carpeta compartida**. 36 | 37 | c. Elija **Ejemplo de GitHub de datos externos**>**Insertar**. El complemento se abrirá en un panel de tareas, tal y como se muestra en este diagrama. 38 | 39 | ![Ejemplo de GitHub de datos externos](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d. Escriba una palabra clave de búsqueda y un lenguaje de programación en las celdas A2 y B2 y haga clic en el botón Obtener información del repositorio para cargar los resultados en la tabla de la hoja de cálculo, tal como se muestra a continuación. 42 | 43 | ![Ejemplo de GitHub de datos externos](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Versión de Visual Studio 46 | 1. Copie el proyecto en una carpeta local y abra Excel-Add-in-JS-ExternalDataGitHub.sln en Visual Studio. 47 | 2. Pulse F5 para crear e implementar el complemento de ejemplo. Excel se inicia y se abre el complemento en un panel de tareas a la derecha de una hoja de cálculo en blanco, como se muestra en la siguiente ilustración. 48 | 49 | ![Ejemplo de GitHub de datos externos](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. Escriba una palabra clave de búsqueda y un lenguaje de programación en las celdas A2 y B2 y haga clic en el botón Obtener información del repositorio para cargar los resultados en la tabla de la hoja de cálculo, tal como se muestra a continuación. 52 | 53 | ![Ejemplo de GitHub de datos externos](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### Obtener más información 57 | 58 | 1. [Introducción a la programación de complementos de Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Explorador de fragmentos de código para Excel](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Ejemplos de código de complementos de Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Referencia de la API de JavaScript de complementos de Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [Compilar el primer complemento de Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-fr-fr.md: -------------------------------------------------------------------------------- 1 | # Exemple de complément de volet Office - GitHub de données externes pour Excel 2016 2 | 3 | _S’applique à : Excel 2016_ 4 | 5 | Ce complément de volet Office montre comment charger des données à partir d’un service externe, par exemple à l’aide des API de recherche GitHub dans Excel 2016. Il a deux versions : éditeur de code et Visual Studio. 6 | 7 | ![Exemple de GitHub de données externes](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## Essayez ! 10 | ### Version d’éditeur de code 11 | 12 | Pour déployer et tester votre complément, le plus simple consiste à copier les fichiers sur un partage réseau. 13 | 14 | 1. Hébergez les fichiers à partir du projet d’éditeur de code à l’aide d’un serveur de votre choix. 15 | 2. Modifiez les éléments \ et \ du fichier manifeste afin qu’il pointe vers l’emplacement hébergé créé à l’étape 1 (par exemple, https://localhost/ExternalDataGitHub/Home.html). 16 | 3. Copiez le fichier manifeste (ExternalDataGitHubManifest.xml) dans un partage réseau (par exemple, \\\MyShare\MyManifests). 17 | 4. Ajoutez l’emplacement de partage qui contient le fichier manifeste sous forme de catalogue d’applications approuvées dans Excel. 18 | 19 | a. Lancez Excel et ouvrez une feuille de calcul vide. 20 | 21 | b. Choisissez l’onglet **Fichier**, puis choisissez **Options**. 22 | 23 | c. Choisissez l’onglet **Centre de gestion de la confidentialité**, puis choisissez **Paramètres du Centre de gestion de la confidentialité**. 24 | 25 | d. Choisissez **Catalogues de compléments approuvés**. 26 | 27 | e. Dans la zone **URL du catalogue**, entrez le chemin d’accès du partage réseau que vous avez créé à l’étape 3, puis choisissez **Ajouter un catalogue**. 28 | 29 | Activez la case à cocher **Afficher dans le menu**, puis cliquez sur **OK**. Un message s’affiche pour vous informer que vos paramètres seront appliqués la prochaine fois que vous démarrerez Office. 30 | 31 | 5. Testez et exécutez le complément. 32 | 33 | a. Dans l’onglet **Insertion** d’Excel 2016, choisissez **Mes compléments**. 34 | 35 | b. Dans la boîte de dialogue **Compléments Office**, choisissez **Dossier partagé**. 36 | 37 | c. Choisissez **Exemple de GitHub de données externes**>**Insertion**. Le complément s’ouvre dans un volet Office, comme indiqué sur le diagramme. 38 | 39 | ![Exemple de GitHub de données externes](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d. Entrez un mot clé de recherche et un langage de programmation dans les cellules A2 et B2, puis cliquez sur le bouton Obtenir des informations sur le référentiel pour charger les résultats dans le tableau de la feuille de calcul, comme indiqué ci-dessous. 42 | 43 | ![Exemple de GitHub de données externes](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Version de Visual Studio 46 | 1. Copiez le projet dans un dossier local et ouvrez le fichier Excel-Add-in-JS-ExternalDataGitHub.sln dans Visual Studio. 47 | 2. Appuyez sur F5 pour créer et déployer l’exemple de complément. Excel démarre et le complément s’ouvre dans un volet Office à droite de la feuille de calcul active, comme indiqué dans l’illustration suivante. 48 | 49 | ![Exemple de GitHub de données externes](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. Entrez un mot clé de recherche et un langage de programmation dans les cellules A2 et B2, puis cliquez sur le bouton Obtenir des informations sur le référentiel pour charger les résultats dans le tableau de la feuille de calcul, comme indiqué ci-dessous. 52 | 53 | ![Exemple de GitHub de données externes](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### En savoir plus 57 | 58 | 1. [Présentation de la programmation JavaScript pour les compléments Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Explorateur d’extraits de code pour Excel](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Exemples de code pour les compléments Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Référence de l’API JavaScript pour les compléments Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [Création de votre premier complément Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-ja-jp.md: -------------------------------------------------------------------------------- 1 | # Excel 2016 用の GitHub 外部データ作業ウィンドウ アドインのサンプル 2 | 3 | _適用対象:Excel 2016_ 4 | 5 | この作業ウィンドウ アドインには、Excel 2016 で GitHub Search API を使用して外部サービスからデータをロードする方法が示されます。コード エディターと Visual Studio のいずれかを選択できます。 6 | 7 | ![外部データ GitHub のサンプル](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## お試しください。 10 | ### コード エディターのバージョン 11 | 12 | アドインを展開してテストする最も簡単な方法は、ファイルをネットワーク共有にコピーすることです。 13 | 14 | 1. 任意のサーバーを使用して、コード エディターのプロジェクトのファイルをホストします。 15 | 2. マニフェスト ファイルの \ 要素と \ 要素を編集して、手順 1 のホストの場所 (たとえば https://localhost/ExternalDataGitHub/Home.html) をポイントするようにします。 16 | 3. マニフェスト (ExternalDataGitHubManifest.xml) をネットワーク共有 (たとえば \\\MyShare\\MyManifests) にコピーします。 17 | 4. マニフェストを格納する共有の場所を、Excel で信頼されるアプリ カタログとして追加します。 18 | 19 | a.Excel を起動し、空のスプレッドシートを開きます。 20 | 21 | b.**[ファイル]** タブを選び、**[オプション]** を選びます。 22 | 23 | c.**[セキュリティ センター]** を選択し、**[セキュリティ センターの設定]** ボタンを選択します。 24 | 25 | d.**[信頼されているアドイン カタログ]** を選びます。 26 | 27 | e.**[カタログの URL]** ボックスで、手順 3 で作成したネットワーク共有のパスを入力し、**[カタログの追加]** を選択します。 28 | 29 | f. **[メニューに表示する]** チェック ボックスをオンにしてから **[OK]** を選択します。これらの設定は Office を次回起動したときに適用されることを示すメッセージが表示されます。 30 | 31 | 5. アドインをテストし、実行します。 32 | 33 | a.Excel 2016 の **[挿入]** タブで、**[個人用アドイン]** を選択します。 34 | 35 | b.**[Office アドイン]** ダイアログ ボックスで、**[共有フォルダー]** を選択します。 36 | 37 | c.**[外部データ GitHub のサンプル]**>**[挿入]** の順に選択します。次の図に示すように、作業ウィンドウでアドインが開きます。 38 | 39 | ![外部データ GitHub のサンプル](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d.セル A2 と B2 に、検索キーワードとプログラミング言語を入力し、[リポジトリ情報を取得] ボタンをクリックすると、以下のように、スプレッドシートのテーブルに結果が読み込まれます。 42 | 43 | ![外部データ GitHub のサンプル](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Visual Studio のバージョン 46 | 1. プロジェクトをローカル フォルダーにコピーし、Visual Studio で Excel-Add-in-JS-ExternalDataGitHub.sln を開きます。 47 | 2. F5 キーを押して、サンプル アドインをビルドおよび展開します。Excel が起動し、次の図に示すように、空白のワークシートの右側の作業ウィンドウでアドインが開きます。 48 | 49 | ![外部データ GitHub のサンプル](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. セル A2 と B2 に、検索キーワードとプログラミング言語を入力し、[リポジトリ情報を取得] ボタンをクリックすると、以下のように、スプレッドシートのテーブルに結果が読み込まれます。 52 | 53 | ![外部データ GitHub のサンプル](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### 詳細を見る 57 | 58 | 1. [Excel アドインのプログラミングの概要](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Excel のスニペット エクスプローラー](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Excel アドインのコード サンプル](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Excel アドインの JavaScript API リファレンス](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [最初の Excel アドインをビルドする](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-pt-br.md: -------------------------------------------------------------------------------- 1 | # Exemplo do Suplemento do Painel de Tarefas de Dados Externos do GitHub para o Excel 2016 2 | 3 | _Aplica-se a: Excel 2016_ 4 | 5 | Esse suplemento do painel de tarefas mostra como carregar dados de um serviço externo como, por exemplo, utilizar as APIs de Pesquisa do GitHub no Excel 2016. Há dois tipos: o editor de código e o Visual Studio. 6 | 7 | ![Amostra de GitHub de Dados Externos](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## Experimente 10 | ### Versão do editor de código 11 | 12 | A maneira mais fácil de implantar e testar o suplemento é copiar os arquivos para um compartilhamento de rede. 13 | 14 | 1. Hospede os arquivos do Projeto do Editor de Códigos usando um servidor de sua escolha. 15 | 2. Edite os elementos \ e \ do arquivo de manifesto para que ele aponte para o local hospedado da etapa 1. (por exemplo, https://localhost/ExternalDataGitHub/Home.html) 16 | 3. Copie o manifesto (ExternalDataGitHubManifest.xml) para um compartilhamento de rede (por exemplo, \\\MyShare\MyManifests). 17 | 4. Adicione o local de compartilhamento que contém o manifesto como um catálogo de aplicativos confiáveis no Excel. 18 | 19 | a. Inicie o Excel e abra uma planilha em branco. 20 | 21 | b. Escolha a guia **Arquivo** e escolha **Opções**. 22 | 23 | c. Escolha **Central de Confiabilidade**, e escolha o botão **Configurações da Central de Confiabilidade**. 24 | 25 | d. Escolha **Catálogos de Suplemento Confiáveis**. 26 | 27 | e. Na caixa **URL de Catálogo**, insira o caminho para o compartilhamento de rede que você criou na etapa 3 e escolha **Adicionar Catálogo**. 28 | 29 | f. Marque a caixa de seleção **Mostrar no Menu** e escolha **OK**. Será exibida uma mensagem para informá-lo de que suas configurações serão aplicadas na próxima vez que você iniciar o Office. 30 | 31 | 5. Teste e execute o suplemento. 32 | 33 | a. Na **guia Inserir** no Excel 2016, escolha **Meus Suplementos**. 34 | 35 | b. Na caixa de diálogo **Suplementos do Office**, escolha **Pasta Compartilhada**. 36 | 37 | c. Escolha **Exemplo de Dados Externos do GitHub**>**Inserir**. O suplemento abre em um painel de tarefas como mostrado neste diagrama. 38 | 39 | ![Amostra de GitHub de Dados Externos](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d. Digite uma palavra-chave de pesquisa e uma linguagem de programação nas células A2 e B2 e clique no botão Obter informações do repositório para carregar os resultados na tabela na planilha conforme mostrado abaixo. 42 | 43 | ![Exemplo de Dados Externos do GitHub](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Versão do Visual Studio 46 | 1. Copie o projeto para uma pasta local e abra o Excel-Add-in-JS-ExternalDataGitHub.sln no Visual Studio. 47 | 2. Pressione F5 para criar e implantar o suplemento de exemplo. O Excel inicia e o suplemento abre em um painel de tarefas à direita da planilha em branco, conforme mostrado na figura a seguir. 48 | 49 | ![Amostra de GitHub de Dados Externos](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. Digite uma palavra-chave de pesquisa e uma linguagem de programação nas células A2 e B2 e clique no botão Obter informações do repositório para carregar os resultados na tabela na planilha conforme mostrado abaixo. 52 | 53 | ![Amostra de GitHub de Dados Externos](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### Saiba mais 57 | 58 | 1. [Visão geral da programação de Suplementos do Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Explorador de Trechos para Excel](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Exemplos de código de Suplementos do Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Referência da API JavaScript de Suplementos do Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [Criar seu primeiro Suplemento do Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-ru-ru.md: -------------------------------------------------------------------------------- 1 | # Пример надстройки области задач для Excel 2016, позволяющей получить внешние данные из GitHub 2 | 3 | _Область применения: Excel 2016_ 4 | 5 | Этот пример надстройки области задач показывает, как загрузить данные из внешней службы, например с помощью API-интерфейсов поиска GitHub в Excel 2016. Надстройка представлена в двух вариантах — для редактора кода и для Visual Studio. 6 | 7 | ![Пример надстройки, позволяющей получить внешние данные из GitHub](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## Проверка 10 | ### Версия для редактора кода 11 | 12 | Самый простой способ развернуть и проверить надстройку — скопировать эти файлы в сетевую папку. 13 | 14 | 1. Разместите файлы из папки Code Editor Proj (Проект редактора кода) на нужном сервере. 15 | 2. Измените элементы \ и \ в файле манифеста, чтобы он указывал на расположение, упоминавшееся на этапе 1 (например, https://localhost/ExternalDataGitHub/Home.html). 16 | 3. Скопируйте манифест (ExternalDataGitHubManifest.xml) в сетевую папку (например, \\\MyShare\MyManifests). 17 | 4. Добавьте общую папку, содержащую этот манифест, в качестве доверенного каталога приложений в Excel. 18 | 19 | А. Запустите Excel и откройте пустую электронную таблицу. 20 | 21 | Б. Перейдите на вкладку **Файл**, а затем выберите **Параметры**. 22 | 23 | В. Выберите **Центр управления безопасностью**, а затем нажмите кнопку **Параметры центра управления безопасностью**. 24 | 25 | Г. Выберите пункт **Доверенные каталоги надстроек**. 26 | 27 | Д. В поле **URL-адрес каталога** введите путь к общему сетевому ресурсу, созданному на шаге 3, и выберите **Добавить каталог**. 28 | 29 | Установите флажок **Показывать в меню** и нажмите кнопку **ОК**. Появится сообщение о том, что параметры будут применены при следующем запуске Office. 30 | 31 | 5. Проверьте и запустите надстройку. 32 | 33 | А. На вкладке **Вставка** в Excel 2016 выберите элемент **Мои надстройки**. 34 | 35 | Б. В диалоговом окне **Надстройки Office** выберите элемент **Общая папка**. 36 | 37 | В. Выберите элементы **External Data GitHub Sample** (Пример надстройки, позволяющей получить внешние данные из GitHub) > **Вставить**. Надстройка откроется в области задач, как показано на схеме. 38 | 39 | ![Пример надстройки, позволяющей получить внешние данные из GitHub](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | Г. Введите ключевое слово для поиска и название языка программирования в ячейках A2 и B2, а затем нажмите кнопку "Get repository info" (Получить данные из репозитория), чтобы загрузить результаты в таблицу на листе, как показано ниже. 42 | 43 | ![Пример надстройки, позволяющей получить внешние данные из GitHub](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Версия для Visual Studio 46 | 1. Скопируйте проект в локальную папку и откройте файл Excel-Add-in-JS-ExternalDataGitHub.sln в Visual Studio. 47 | 2. Нажмите клавишу F5, чтобы собрать и развернуть пример надстройки. Запустится Excel, а надстройка откроется в области задач справа от пустого листа, как показано на представленном ниже рисунке. 48 | 49 | ![Пример надстройки, позволяющей получить внешние данные из GitHub](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. Введите ключевое слово для поиска и название языка программирования в ячейках A2 и B2, а затем нажмите кнопку "Get repository info" (Получить данные из репозитория), чтобы загрузить результаты в таблицу на листе, как показано ниже. 52 | 53 | ![Пример надстройки, позволяющей получить внешние данные из GitHub](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### Подробнее 57 | 58 | 1. [Общие сведения о программировании надстроек Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Обозреватель фрагментов кода для Excel](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Примеры кода надстроек Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Справочник по API JavaScript для надстроек Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [Создание первой надстройки Excel](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-zh-cn.md: -------------------------------------------------------------------------------- 1 | # 适用于 Excel 2016 的 GitHub 外部数据任务窗格外接程序示例 2 | 3 | _适用于:Excel 2016_ 4 | 5 | 此任务窗格外接程序介绍如何从外部服务加载数据,如通过使用 Excel 2016 中的 GitHub 搜索 API。它有两种类型:代码编辑器和 Visual Studio。 6 | 7 | ![外部数据 GitHub 示例](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## 尝试一下 10 | ### 代码编辑器版本 11 | 12 | 部署和测试外接程序的最简单方法是将文件复制到网络共享中。 13 | 14 | 1. 使用你选择的服务器托管代码编辑器项目文件夹中的文件。 15 | 2. 编辑清单文件中的 \ 和 \ 元素,使其指向第 1 步中的托管位置(例如,https://localhost/ExternalDataGitHub/Home.html) 16 | 3. 将清单文件 (ExternalDataGitHubManifest.xml) 复制到网络共享(例如,\\\MyShare\\MyManifests)中。 17 | 4. 添加将清单作为 Excel 中受信任的应用目录的共享位置。 18 | 19 | a.启动 Excel 并打开一个空白的电子表格。 20 | 21 | b.依次选择“**文件**”选项卡和“**选项**”。 22 | 23 | c.依次选择“**信任中心**”和“**信任中心设置**”按钮。 24 | 25 | d.选择“**受信任的外接程序目录**”。 26 | 27 | e.在“**目录 URL**”框中,输入你在第 3 步中创建的网络共享路径,然后选择“**添加目录**”。 28 | 29 | f. 选中“**显示在菜单中**”复选框,然后选择“**确定**”。此时,系统会显示一条消息,提醒你注意你的设置将在 Office 下次启动时应用。 30 | 31 | 5. 测试并运行外接程序。 32 | 33 | a.在 Excel 2016 的“**插入**”选项卡中,选择“**我的外接程序**”。 34 | 35 | b.在“**Office 外接程序**”对话框中,选择“**共享文件夹**”。 36 | 37 | c.依次选择“**外部数据 GitHub 示例**”>“**插入**”。此时,外接程序在任务窗格中打开,如下图所示。 38 | 39 | ![外部数据 GitHub 示例](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d.在 A2 和 B2 单元格中输入一个搜索关键字和编程语言,然后单击“获取存储库信息”按钮,以将结果加载到电子表格中的表,如下所示。 42 | 43 | ![外部数据 GitHub 示例](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Visual Studio 版本 46 | 1. 将项目复制到本地文件夹,并在 Visual Studio 中打开 Excel-Add-in-JS-ExternalDataGitHub.sln。 47 | 2. 按 F5 生成并部署示例外接程序。Excel 启动并且外接程序会在空白工作簿右侧的任务窗格中打开,如下图所示。 48 | 49 | ![外部数据 GitHub 示例](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. 在 A2 和 B2 单元格中输入一个搜索关键字和编程语言,然后单击“获取存储库信息”按钮,以将结果加载到电子表格中的表,如下所示。 52 | 53 | ![外部数据 GitHub 示例](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### 了解详细信息 57 | 58 | 1. [Excel 外接程序编程概述](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [适用于 Excel 的代码段资源管理器](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Excel 外接程序代码示例](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Excel 外接程序 JavaScript API 参考](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [生成你的第一个 Excel 外接程序](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /README-Localized/README-zh-tw.md: -------------------------------------------------------------------------------- 1 | # Excel 2016 的來自 GitHub 的外部資料工作窗格增益集範例 2 | 3 | _適用於:Excel 2016_ 4 | 5 | 這個工作窗格增益集示範如何從外部服務載入資料,例如在 Excel 2016 中使用 GitHub Search API。共有兩種型態︰程式碼編輯器和 Visual Studio。 6 | 7 | ![外部資料 GitHub 範例](../images/ExternalDataGitHub_data.PNG) 8 | 9 | ## 進行測試 10 | ### 程式碼編輯器版本 11 | 12 | 部署及測試增益集的最簡單方式,是將檔案複製到網路共用。 13 | 14 | 1. 使用您所選擇的伺服器來從程式碼編輯器專案中裝載檔案。 15 | 2. 編輯資訊清單檔的 \ 和 \ 項目,讓它指向步驟 1 中建立的裝載位置。(例如,https://localhost/ExternalDataGitHub/Home.html) 16 | 3. 將資訊清單 (ExternalDataGitHubManifest.xml) 複製到網路共用 (例如,\\\MyShare\MyManifests)。 17 | 4. 在 Excel 中,將包含資訊清單的共用位置新增為受信任的應用程式目錄。 18 | 19 | a.啟動 Excel,並開啟空白的試算表。 20 | 21 | b.選擇 **[檔案]** 索引標籤,然後選擇 **[選項]**。 22 | 23 | c.選擇 **[信任中心]**,然後選擇 **[信任中心設定]** 按鈕。 24 | 25 | d.選擇 **[受信任的增益集目錄]**。 26 | 27 | e.在 **[目錄 URL]** 方塊中,輸入您在步驟 3 建立的網路共用路徑,然後選擇 **[新增目錄]**。 28 | 29 | f.選取 **[顯示於功能表中]** 核取方塊,然後選擇 **[確定]**。接著會顯示訊息,通知您下次啟動 Office 時就會套用您的設定。 30 | 31 | 5. 測試並執行增益集。 32 | 33 | a.在 Excel 2016 的 **[插入]** 索引標籤中,選擇 **[我的增益集]**。 34 | 35 | b.在 **[Office 增益集]** 對話方塊中,選擇 **[共用資料夾]**。 36 | 37 | c.選擇 **[外部資料 GitHub 範例]** > **[插入]**。增益集會在工作窗格中開啟,如此圖表所示。 38 | 39 | ![外部資料 GitHub 範例](../images/ExternalDataGitHub_taskpane.PNG) 40 | 41 | d.在儲存格 A2 與 B2 中,輸入搜尋關鍵字和程式設計語言,按一下 [取得儲存機制資訊] 按鈕,將結果載入至試算表中的資料表,如下所示。 42 | 43 | ![外部資料 GitHub 範例](../images/ExternalDataGitHub_data.PNG) 44 | 45 | ### Visual Studio 版本 46 | 1. 將專案複製到本機資料夾,並在 Visual Studio 中開啟 Excel-Add-in-JS-ExternalDataGitHub.sln。 47 | 2. 按 F5 建置及部署範例增益集。Excel 會啟動,且增益集會在工作表右側空白部分的工作窗格中開啟,如下圖所示。 48 | 49 | ![外部資料 GitHub 範例](../images/ExternalDataGitHub_taskpane.PNG) 50 | 51 | 3. 在儲存格 A2 與 B2 中,輸入搜尋關鍵字和程式設計語言,按一下 [取得儲存機制資訊] 按鈕,將結果載入至試算表中的資料表,如下所示。 52 | 53 | ![外部資料 GitHub 範例](../images/ExternalDataGitHub_data.PNG) 54 | 55 | 56 | ### 深入了解 57 | 58 | 1. [Excel 增益集程式設計概觀](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 59 | 2. [Excel 的程式碼片段總管](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 60 | 3. [Excel 增益集程式碼範例](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 61 | 4. [Excel 增益集 JavaScript API 參考](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 62 | 5. [建立第一個 Excel 增益集](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # [ARCHIVED] External Data from GitHub Task Pane Add-in Sample for Excel 2016 2 | 3 | **Note:** This repo is archived and no longer actively maintained. Security vulnerabilities may exist in the project, or its dependencies. If you plan to reuse or run any code from this repo, be sure to perform appropriate security checks on the code or dependencies first. Do not use this project as the starting point of a production Office Add-in. Always start your production code by using the Office/SharePoint development workload in Visual Studio, or the [Yeoman generator for Office Add-ins](https://github.com/OfficeDev/generator-office), and follow security best practices as you develop the add-in. 4 | _Applies to: Excel 2016_ 5 | 6 | This task pane add-in shows how to load data from an external service such as by using the GitHub Search APIs in Excel 2016. It comes in two flavors: code editor and Visual Studio. 7 | 8 | ![External Data GitHub Sample](images/ExternalDataGitHub_data.PNG) 9 | 10 | ## Try it out 11 | ### Code editor version 12 | 13 | The simplest way to deploy and test your add-in is to copy the files to a network share. 14 | 15 | 1. Host the files from the Code Editor Proj by using a server of your choice. 16 | 2. Edit the \ and \ elements of the manifest file so that it points to the hosted location from step 1. (for example, https://localhost/ExternalDataGitHub/Home.html) 17 | 3. Copy the manifest (ExternalDataGitHubManifest.xml) to a network share (for example, \\\MyShare\MyManifests). 18 | 4. Add the share location that contains the manifest as a trusted app catalog in Excel. 19 | 20 | a. Launch Excel and open a blank spreadsheet. 21 | 22 | b. Choose the **File** tab, and then choose **Options**. 23 | 24 | c. Choose **Trust Center**, and then choose the **Trust Center Settings** button. 25 | 26 | d. Choose **Trusted Add-in Catalogs**. 27 | 28 | e. In the **Catalog Url** box, enter the path to the network share you created in step 3, and then choose **Add Catalog**. 29 | 30 | f. Select the **Show in Menu** check box, and then choose **OK**. A message appears to inform you that your settings will be applied the next time you start Office. 31 | 32 | 5. Test and run the add-in. 33 | 34 | a. In the **Insert tab** in Excel 2016, choose **My Add-ins**. 35 | 36 | b. In the **Office Add-ins** dialog box, choose **Shared Folder**. 37 | 38 | c. Choose **External Data GitHub Sample**>**Insert**. The add-in opens in a task pane as shown in this diagram. 39 | 40 | ![External Data GitHub Sample](images/ExternalDataGitHub_taskpane.PNG) 41 | 42 | d. Enter a search keyword and a programming language in the cells, A2 and B2 and click the Get repository info button to load the results into the table in the spreadsheet as shown below. 43 | 44 | ![External Data GitHub Sample](images/ExternalDataGitHub_data.PNG) 45 | 46 | ### Visual Studio version 47 | 1. Copy the project to a local folder and open the Excel-Add-in-JS-ExternalDataGitHub.sln in Visual Studio. 48 | 2. Press F5 to build and deploy the sample add-in. Excel launches and the add-in opens in a task pane to the right of a blank worksheet, as shown in the following figure. 49 | 50 | ![External Data GitHub Sample](images/ExternalDataGitHub_taskpane.PNG) 51 | 52 | 3. Enter a search keyword and a programming language in the cells, A2 and B2 and click the Get repository info button to load the results into the table in the spreadsheet as shown below. 53 | 54 | ![External Data GitHub Sample](images/ExternalDataGitHub_data.PNG) 55 | 56 | 57 | ### Learn more 58 | 59 | 1. [Excel Add-ins programming overview](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-programming-overview.md) 60 | 2. [Snippet Explorer for Excel](http://officesnippetexplorer.azurewebsites.net/#/snippets/excel) 61 | 3. [Excel Add-ins code samples](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-code-samples.md) 62 | 4. [Excel Add-ins JavaScript API Reference](https://github.com/OfficeDev/office-js-docs/blob/master/excel/excel-add-ins-javascript-reference.md) 63 | 5. [Build your first Excel Add-in](https://github.com/OfficeDev/office-js-docs/blob/master/excel/build-your-first-excel-add-in.md) 64 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHub.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Excel-Add-in-JS-ExternalDataGitHub", "Excel-Add-in-JS-ExternalDataGitHub\Excel-Add-in-JS-ExternalDataGitHub.csproj", "{FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Excel-Add-in-JS-ExternalDataGitHubWeb", "Excel-Add-in-JS-ExternalDataGitHubWeb\Excel-Add-in-JS-ExternalDataGitHubWeb.csproj", "{EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 19 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C}.Release|Any CPU.Deploy.0 = Release|Any CPU 22 | {EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(SolutionProperties) = preSolution 28 | HideSolutionNode = FALSE 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHub/Excel-Add-in-JS-ExternalDataGitHub.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {FD5AD967-A9A8-40D6-BB41-269FC1DDC22C} 8 | Library 9 | Properties 10 | Excel_Add_in_JS_ExternalDataGitHub 11 | Excel-Add-in-JS-ExternalDataGitHub 12 | v4.5 13 | 15.0 14 | 512 15 | {C1CDDADD-2546-481F-9697-4EA41081F2FC};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 16 | False 17 | {40d847eb-a1ab-445b-8f0d-319c6febfbc7} 18 | {a3fc32e9-ae24-488d-8907-d622c43c5f62} 19 | {b460c230-3830-4795-b680-074daadc39da} 20 | {58cd613f-b841-41cf-8967-349555d309bd} 21 | {d644389b-118f-40e0-b703-691376b6284a} 22 | OfficeApp 23 | 24 | 25 | true 26 | full 27 | false 28 | bin\Debug\ 29 | DEBUG;TRACE 30 | prompt 31 | 4 32 | false 33 | 34 | 35 | pdbonly 36 | true 37 | bin\Release\ 38 | TRACE 39 | prompt 40 | 4 41 | false 42 | 43 | 44 | 45 | {d5c5a603-8a57-4875-a035-84f523a6b776} 46 | 47 | 48 | manifest-oemanifest 49 | 50 | 51 | 52 | 53 | {EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E} 54 | Excel-Add-in-JS-ExternalDataGitHubWeb 55 | True 56 | Web 57 | SharePointWebProjectOutput 58 | Excel-Add-in-JS-ExternalDataGitHubWeb 59 | False 60 | 61 | 62 | 63 | 10.0 64 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 65 | 66 | 67 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHub/Excel-Add-in-JS-ExternalDataGitHubManifest/Excel-Add-in-JS-ExternalDataGitHub.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 4fd3364f-09b7-440f-aaa9-2cafe23e0687 9 | 1.0.0.0 10 | Microsoft 11 | en-US 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ReadWriteDocument 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 40 | <Description resid="Contoso.GetStarted.Description"/> 41 | 42 | <!-- Point to a url resource which details how the add-in should be used. --> 43 | <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/> 44 | </GetStarted> 45 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 46 | Think of the FunctionFile as the code behind ExecuteFunction. --> 47 | <FunctionFile resid="Contoso.DesktopFunctionFile.Url" /> 48 | 49 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 50 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 51 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 52 | <OfficeTab id="TabHome"> 53 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 54 | <Group id="Contoso.Group"> 55 | <!-- Label for your group. resid must point to a ShortString resource. --> 56 | <Label resid="Contoso.ExcelAddin" /> 57 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 58 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 59 | <Icon> 60 | <bt:Image size="16" resid="Contoso.tpicon_16x16" /> 61 | <bt:Image size="32" resid="Contoso.tpicon_32x32" /> 62 | <bt:Image size="80" resid="Contoso.tpicon_80x80" /> 63 | </Icon> 64 | 65 | <!-- Control. It can be of type "Button" or "Menu". --> 66 | <Control xsi:type="Button" id="Contoso.TaskpaneButton"> 67 | <Label resid="Contoso.TaskpaneButton.Label" /> 68 | <Supertip> 69 | <!-- ToolTip title. resid must point to a ShortString resource. --> 70 | <Title resid="Contoso.TaskpaneButton.Label" /> 71 | <!-- ToolTip description. resid must point to a LongString resource. --> 72 | <Description resid="Contoso.TaskpaneButton.Tooltip" /> 73 | </Supertip> 74 | <Icon> 75 | <bt:Image size="16" resid="Contoso.tpicon_16x16" /> 76 | <bt:Image size="32" resid="Contoso.tpicon_32x32" /> 77 | <bt:Image size="80" resid="Contoso.tpicon_80x80" /> 78 | </Icon> 79 | 80 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 81 | <Action xsi:type="ShowTaskpane"> 82 | <SourceLocation resid="Contoso.Taskpane.Url"></SourceLocation> 83 | </Action> 84 | </Control> 85 | </Group> 86 | </OfficeTab> 87 | </ExtensionPoint> 88 | </DesktopFormFactor> 89 | </Host> 90 | </Hosts> 91 | 92 | <!-- You can use resources across hosts and form factors. --> 93 | <Resources> 94 | <bt:Images> 95 | <bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://appcommandicons.blob.core.windows.net/images/taskpane_16x.png" /> 96 | <bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://appcommandicons.blob.core.windows.net/images/taskpane_32x.png" /> 97 | <bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://appcommandicons.blob.core.windows.net/images/taskpane_80x.png" /> 98 | </bt:Images> 99 | <bt:Urls> 100 | <bt:Url id="Contoso.Taskpane.Url" DefaultValue="~remoteAppUrl/App/Home/Home.html" /> 101 | <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 102 | </bt:Urls> 103 | <!-- ShortStrings max characters==125. --> 104 | <bt:ShortStrings> 105 | <bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="External Data from GitHub" /> 106 | <bt:String id="Contoso.ExcelAddin" DefaultValue="Excel Add-in" /> 107 | <bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with Excel JS External Data from GitHub." /> 108 | </bt:ShortStrings> 109 | <!-- LongStrings max characters==250. --> 110 | <bt:LongStrings> 111 | <bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to launch the add-in" /> 112 | <bt:String id="Contoso.GetStarted.Description" DefaultValue="Your add-in loaded succesfully. Go to the HOME tab and click the 'External Data from GitHub' button to get started." /> 113 | </bt:LongStrings> 114 | </Resources> 115 | </VersionOverrides> 116 | <!-- End Add-in Commands Mode integration. --> 117 | </OfficeApp> 118 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHub/Excel-Add-in-JS-ExternalDataGitHubManifest/SharePointProjectItem.spdata: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <ProjectItem Type="Microsoft.VisualStudio.SharePoint.OfficeApp" DefaultFile="Excel-Add-in-JS-ExternalDataGitHub.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="AppPackage" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel"> 3 | <Files> 4 | <ProjectItemFile Source="Excel-Add-in-JS-ExternalDataGitHub.xml" Type="AppPackage" /> 5 | </Files> 6 | <ExtensionData> 7 | <ExtensionDataItem Key="OfficeAppManifestRelativePath" Value="Excel-Add-in-JS-ExternalDataGitHubManifest\Excel-Add-in-JS-ExternalDataGitHub.xml" /> 8 | </ExtensionData> 9 | </ProjectItem> -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/App/App.css: -------------------------------------------------------------------------------- 1 | /* Common app styling */ 2 | 3 | #content-header { 4 | background: #2a8dd4; 5 | color: #fff; 6 | position: absolute; 7 | top: 0; 8 | left: 0; 9 | width: 100%; 10 | height: 80px; /* Fixed header height */ 11 | overflow: hidden; /* Disable scrollbars for header */ 12 | } 13 | 14 | #content-main { 15 | background: #fff; 16 | position: fixed; 17 | top: 80px; /* Same value as #content-header's height */ 18 | left: 0; 19 | right: 0; 20 | bottom: 0; 21 | overflow: auto; /* Enable scrollbars within main content section */ 22 | } 23 | 24 | .padding { 25 | padding: 15px; 26 | } 27 | 28 | #notification-message { 29 | background-color: #818285; 30 | color: #fff; 31 | position: absolute; 32 | width: 100%; 33 | min-height: 80px; 34 | right: 0; 35 | z-index: 100; 36 | bottom: 0; 37 | display: none; /* Hidden until invoked */ 38 | } 39 | 40 | #notification-message #notification-message-header { 41 | font-size: medium; 42 | margin-bottom: 10px; 43 | } 44 | 45 | #notification-message #notification-message-close { 46 | background-image: url("../Images/Close.png"); 47 | background-repeat: no-repeat; 48 | width: 24px; 49 | height: 24px; 50 | position: absolute; 51 | right: 5px; 52 | top: 5px; 53 | cursor: pointer; 54 | } 55 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/App/App.js: -------------------------------------------------------------------------------- 1 | /* Common app functionality */ 2 | 3 | var app = (function () { 4 | "use strict"; 5 | 6 | var app = {}; 7 | 8 | // Common initialization function (to be called from each page) 9 | app.initialize = function () { 10 | $('body').append( 11 | '<div id="notification-message">' + 12 | '<div class="padding">' + 13 | '<div id="notification-message-close"></div>' + 14 | '<div id="notification-message-header"></div>' + 15 | '<div id="notification-message-body"></div>' + 16 | '</div>' + 17 | '</div>'); 18 | 19 | $('#notification-message-close').click(function () { 20 | $('#notification-message').hide(); 21 | }); 22 | 23 | 24 | // After initialization, expose a common notification function 25 | app.showNotification = function (header, text) { 26 | $('#notification-message-header').text(header); 27 | $('#notification-message-body').text(text); 28 | $('#notification-message').slideDown('fast'); 29 | }; 30 | }; 31 | 32 | return app; 33 | })(); -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/App/Home/Home.css: -------------------------------------------------------------------------------- 1 | /* Page-specific styling */ 2 | 3 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/App/Home/Home.html: -------------------------------------------------------------------------------- 1 | <!-- Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 2 | See full license at the bottom of this file. --> 3 | 4 | <!DOCTYPE html> 5 | <html> 6 | <head> 7 | <meta charset="UTF-8" /> 8 | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 9 | <title>External Data GitHub Sample 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 |

Welcome

36 |
37 |
38 |
39 |
40 |

41 | This sample shows how to load data from an external service using the Excel JavaScript API. This 42 | sample uses the public GitHub Search Repositories API 43 | to pull some information about public repositories on GitHub and load that information into the worksheet. 44 |

45 |
46 |

Try it out

47 |

48 | Enter a search keyword and optionally, a programming language in cells, A2 and B2, and click the button to see a 49 | list of the matching public repositories on GitHub. 50 |

51 | 52 |
53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/App/Home/Home.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 2 | See full license at the bottom of this file. */ 3 | 4 | /// 5 | 6 | (function () { 7 | "use strict"; 8 | 9 | // The initialize function must be run each time a new page is loaded 10 | Office.initialize = function (reason) { 11 | $(document).ready(function () { 12 | app.initialize(); 13 | 14 | // If not using Excel 2016, return 15 | if (!Office.context.requirements.isSetSupported('ExcelApi', '1.1')) { 16 | app.showNotification("Need Office 2016 or greater", "Sorry, this add-in only works with newer versions of Excel."); 17 | return; 18 | } 19 | 20 | // Attach a click event handler for the button 21 | $('#get-repo-info').click(getRepoInfo); 22 | 23 | // Put the default search keyword and language into the active worksheet 24 | // Run a batch operation against the Excel object model 25 | Excel.run(function (ctx) { 26 | 27 | var labels = [["Keyword", "Language"], 28 | ["Excel", "JavaScript"]]; 29 | 30 | // Create a proxy object for the active sheet 31 | var sheet = ctx.workbook.worksheets.getActiveWorksheet(); 32 | 33 | // Queue a command to set the value of the range with keyword and language 34 | sheet.getRange("A1:B2").values = labels; 35 | 36 | // Queue a command to format the header row 37 | sheet.getRange("A1:B1").format.font.bold = true; 38 | 39 | //Run the queued-up commands, and return a promise to indicate task completion 40 | return ctx.sync(); 41 | }) 42 | .catch(function (error) { 43 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 44 | app.showNotification("Error: " + error); 45 | console.log("Error: " + error); 46 | if (error instanceof OfficeExtension.Error) { 47 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 48 | } 49 | }); 50 | }); 51 | }; 52 | 53 | // Click event handler for the button 54 | // Get repo information from GitHub using their public Search API 55 | function getRepoInfo() { 56 | 57 | // Run a batch operation against the Excel object model 58 | Excel.run(function (ctx) { 59 | 60 | // Create a proxy object for the active sheet 61 | var sheet = ctx.workbook.worksheets.getActiveWorksheet(); 62 | 63 | // Create a proxy object for the range that contains the city and state 64 | var range = sheet.getRange("A2:B2"); 65 | 66 | // Queue a command to load the values of the range 67 | range.load("values"); 68 | 69 | // We need to delete output table if it already exists 70 | // Queue a command to load the name property of the table items of the worksheet 71 | sheet.tables.load("name"); 72 | 73 | //Run the queued-up commands, and return a promise to indicate task completion 74 | return ctx.sync().then(function () { 75 | 76 | // Loop through the tables collection to find out if the output table already exists 77 | for (var i = 0; i < sheet.tables.items.length; i++) { 78 | if (sheet.tables.items[i].name == "reposTable") { 79 | sheet.tables.items[i].delete(); 80 | break; 81 | } 82 | } 83 | 84 | // Get the city and state 85 | var keyword = range.values[0][0]; 86 | var language = range.values[0][1]; 87 | 88 | // Create the URL 89 | var requestUrl = "https://api.github.com/search/repositories?q=" + keyword + "+language:" + language + "&sort=stars&order=desc"; 90 | 91 | // Make the AJAX request to the GitHub Search API (https://developer.github.com/v3/search/#search-repositories) 92 | // This API by default returns the first 30 matching repos. If you want additional results, look up the GitHub docs for info 93 | // Note that for unauthenticated requests like this, GitHub API allows you to make up to 10 requests per minute. 94 | $.ajax(requestUrl) 95 | .done(function (data) { 96 | // Write the repo info to the active sheet 97 | writeRepoInfo(data); 98 | }) 99 | .fail(function (jqXHR, textStatus, errorThrown) { 100 | var response = $.parseJSON(jqXHR.responseText); 101 | app.showNotification("Error calling GitHub API", "Error message: " + response.message + ". " 102 | + "For more info, check out: " + response.documentation_url); 103 | console.log(JSON.stringify(jqXHR)); 104 | }); 105 | }) 106 | .then(ctx.sync) 107 | .catch(function (error) { 108 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 109 | app.showNotification("Error: " + error); 110 | console.log("Error: " + error); 111 | if (error instanceof OfficeExtension.Error) { 112 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 113 | } 114 | }); 115 | }) 116 | } 117 | 118 | 119 | // Write the repo info to the active sheet 120 | function writeRepoInfo(repos) { 121 | 122 | // Run a batch operation against the Excel object model 123 | Excel.run(function (ctx) { 124 | 125 | // Create a proxy object for the active sheet 126 | var sheet = ctx.workbook.worksheets.getActiveWorksheet(); 127 | 128 | // Queue a command to add a new table to contain the results 129 | var table = sheet.tables.add('A8:G8', true); 130 | table.name = "reposTable"; 131 | 132 | // Queue a command to get the newly added table 133 | table.getHeaderRowRange().values = [["NAME", "FULL NAME", "URL", "DESCRIPTION", "FORKS_COUNT", "STAR_GAZERS_COUNT", "WATCHERS_COUNT"]]; 134 | 135 | 136 | // Create a proxy object for the table rows 137 | var tableRows = table.rows; 138 | var items = repos.items; 139 | 140 | for (var i in items) { 141 | // Queue commands to add some sample rows to the course table 142 | tableRows.add(null, [[items[i].name, items[i].full_name, items[i].url, items[i].description, items[i].forks_count, items[i].stargazers_count, items[i].watchers_count]]); 143 | } 144 | 145 | //Run the queued-up commands, and return a promise to indicate task completion 146 | return ctx.sync(); 147 | 148 | }) 149 | .catch(function (error) { 150 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 151 | app.showNotification("Error: " + error); 152 | console.log("Error: " + error); 153 | if (error instanceof OfficeExtension.Error) { 154 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 155 | } 156 | }); 157 | } 158 | })(); 159 | 160 | /* 161 | Excel-Add-in-JS-ExternalDataGitHub, https://github.com/OfficeDev/Excel-Add-in-JS-ExternalDataGitHub 162 | 163 | Copyright (c) Microsoft Corporation 164 | 165 | All rights reserved. 166 | 167 | MIT License: 168 | 169 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 170 | associated documentation files (the "Software"), to deal in the Software without restriction, including 171 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 172 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 173 | following conditions: 174 | 175 | The above copyright notice and this permission notice shall be included in all copies or substantial 176 | portions of the Software. 177 | 178 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 179 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 180 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 181 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 182 | USE OR OTHER DEALINGS IN THE SOFTWARE. 183 | */ -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Content/Office.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /********************** Office CSS library ***********************/ 3 | /********************** Version: 1.0.2.0 *************************/ 4 | /*****************************************************************/ 5 | 6 | /****************************************************************** 7 | Base 8 | ******************************************************************/ 9 | body { 10 | margin: 0; 11 | padding: 0; 12 | border: 0; 13 | height: 100%; 14 | max-height: 100%; 15 | } 16 | 17 | /****************************************************************** 18 | Typography 19 | ******************************************************************/ 20 | body { 21 | font-family: "Segoe WP", "Segoe UI", "Arial", sans-serif; 22 | font-size: 12px; 23 | color: #262626; 24 | } 25 | 26 | h1 { 27 | font-family: "Segoe WP Light", "Segoe UI", "Arial", sans-serif; 28 | font-size: 22px; 29 | line-height: 26px; 30 | font-weight: 500; 31 | } 32 | 33 | h2, h3, h4, h5, h6, th { 34 | font-family: "Segoe WP Semibold", "Segoe UI", "Arial", sans-serif; 35 | } 36 | 37 | h2 { 38 | font-size: 18px; 39 | line-height: 22px; 40 | font-weight: 600; 41 | } 42 | 43 | h3, h4, h5, h6 { 44 | font-size: 13px; 45 | line-height: 16px; 46 | } 47 | 48 | h3 { 49 | font-weight: 600; 50 | } 51 | 52 | h4, h5, h6 { 53 | font-weight: normal; 54 | } 55 | 56 | form, input, select, button, textarea { 57 | font-family: "Segoe WP", "Segoe UI", "Arial", sans-serif; 58 | font-size: 12px; 59 | line-height: 16px; 60 | } 61 | 62 | /****************************************************************** 63 | General 64 | ******************************************************************/ 65 | a { 66 | color: #336699; 67 | text-decoration: none; 68 | } 69 | 70 | a:focus, a:hover, a:active { 71 | text-decoration: underline; 72 | } 73 | 74 | ul { 75 | margin-left: 1.4em; 76 | padding: 0; 77 | } 78 | 79 | hr { 80 | border: none; 81 | height: 1px; 82 | color: #ebebeb; 83 | background-color: #ebebeb; 84 | clear: both; 85 | } 86 | 87 | img { 88 | border: none; 89 | } 90 | 91 | blockquote { 92 | margin-left: 1.4em; 93 | } 94 | 95 | /****************************************************************** 96 | Forms 97 | ******************************************************************/ 98 | form { 99 | clear: both; 100 | } 101 | 102 | label { 103 | margin-right: 3px; 104 | } 105 | 106 | input, textarea, select, button { 107 | margin: 0 0 5px 0; 108 | padding: 3px; 109 | -webkit-box-sizing: border-box; 110 | -moz-box-sizing: border-box; 111 | box-sizing: border-box; 112 | } 113 | 114 | input[type="checkbox"], input[type="radio"] { 115 | margin-right: 4px; 116 | } 117 | 118 | input[type="checkbox"], input[type="radio"], 119 | input[type="file"], input[type="image"] { 120 | padding: 0; 121 | } 122 | 123 | button, textarea, select, 124 | input:not([type]), 125 | input[type="button"], 126 | input[type="color"], 127 | input[type="date"], 128 | input[type="datetime"], 129 | input[type="datetime-local"], 130 | input[type="email"], 131 | input[type="month"], 132 | input[type="number"], 133 | input[type="password"], 134 | input[type="reset"], 135 | input[type="search"], 136 | input[type="submit"], 137 | input[type="tel"], 138 | input[type="text"], 139 | input[type="time"], 140 | input[type="url"], 141 | input[type="week"] { 142 | border: 1px solid #cccccc; 143 | background-color: white; 144 | } 145 | 146 | button, input[type="button"], 147 | input[type="submit"], input[type="reset"] { 148 | padding-left: 10px; 149 | padding-right: 10px; 150 | text-align: center; 151 | } 152 | 153 | button:hover:enabled, 154 | input[type="button"]:hover:enabled, 155 | input[type="submit"]:hover:enabled, 156 | input[type="reset"]:hover:enabled { 157 | border-color: #7eB4ea; 158 | background-color: #e5f1fc; 159 | } 160 | 161 | button:active:enabled, 162 | input[type="button"]:active:enabled, 163 | input[type="submit"]:active:enabled, 164 | input[type="reset"]:active:enabled { 165 | border-color: #569de5; 166 | background-color: #cee5fc; 167 | } 168 | 169 | /****************************************************************** 170 | Scrollbars 171 | ******************************************************************/ 172 | body { 173 | scrollbar-base-color: white; 174 | scrollbar-arrow-color: #ababab; 175 | scrollbar-highlight-color: #ababab; 176 | scrollbar-darkshadow-color: white; 177 | scrollbar-track-color: white; 178 | scrollbar-face-color: white; 179 | } 180 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Content/OfficeThemes.css: -------------------------------------------------------------------------------- 1 | /* The following classes describe the common theme information for office documents */ 2 | 3 | 4 | 5 | /* Basic Font and Background Colors for text */ 6 | .office-docTheme-primary-fontColor { color:#000000; } 7 | .office-docTheme-primary-bgColor { background-color:#ffffff; } 8 | .office-docTheme-secondary-fontColor { color: #000000; } 9 | .office-docTheme-secondary-bgColor { background-color: #ffffff; } 10 | 11 | 12 | /* Accent color definitions for fonts */ 13 | .office-contentAccent1-color { color:#5b9bd5; } 14 | .office-contentAccent2-color { color:#ed7d31; } 15 | .office-contentAccent3-color { color:#a5a5a5; } 16 | .office-contentAccent4-color { color:#ffc000; } 17 | .office-contentAccent5-color { color:#4472c4; } 18 | .office-contentAccent6-color { color:#70ad47; } 19 | 20 | /* Accent color for backgrounds */ 21 | .office-contentAccent1-bgColor { background-color:#5b9bd5; } 22 | .office-contentAccent2-bgColor { background-color:#ed7d31; } 23 | .office-contentAccent3-bgColor { background-color:#a5a5a5; } 24 | .office-contentAccent4-bgColor { background-color:#ffc000; } 25 | .office-contentAccent5-bgColor { background-color:#4472c4; } 26 | .office-contentAccent6-bgColor { background-color:#70ad47; } 27 | 28 | /* Accent color for borders */ 29 | .office-contentAccent1-borderColor { border-color:#5b9bd5; } 30 | .office-contentAccent2-borderColor { border-color:#ed7d31; } 31 | .office-contentAccent3-borderColor { border-color:#a5a5a5; } 32 | .office-contentAccent4-borderColor { border-color:#ffc000; } 33 | .office-contentAccent5-borderColor { border-color:#4472c4; } 34 | .office-contentAccent6-borderColor { border-color:#70ad47; } 35 | 36 | /* links */ 37 | .office-a {color: #0563c1; } 38 | .office-a:visited { color: #954f72; } 39 | 40 | /* Body Fonts */ 41 | .office-bodyFont-eastAsian { } /* East Asian name of the Font */ 42 | .office-bodyFont-latin { font-family:"Calibri"; } /* Latin name of the Font */ 43 | .office-bodyFont-script { } /* Script name of the Font */ 44 | .office-bodyFont-localized { font-family:"Calibri"; } /* Localized name of the Font. contains the default font name according to the culture currently used in Office */ 45 | 46 | /* Headers Font */ 47 | .office-headerFont-eastAsian { } 48 | .office-headerFont-latin { font-family:"Calibri Light"; } 49 | .office-headerFont-script { } 50 | .office-headerFont-localized { font-family:"Calibri Light"; } 51 | 52 | 53 | 54 | /* The following classes define the Office themes. This classes make sense for the taskpane apps */ 55 | 56 | /* Basic Font and Background Colors for PPT */ 57 | .office-officeTheme-primary-fontColor { color:#b83b1d; } 58 | .office-officeTheme-primary-bgColor { background-color:#dedede; } 59 | .office-officeTheme-secondary-fontColor { color:#262626; } 60 | .office-officeTheme-secondary-bgColor { background-color:#ffffff; } 61 | 62 | /* Basic Font and Background Colors for Outlook Web Access */ 63 | /* remove comments and delete other apps officeTheme classes to get OWA defaults 64 | .office-officeTheme-primary-fontColor { color:#ea4400; } 65 | .office-officeTheme-primary-bgColor { background-color:#ffffff; } 66 | .office-officeTheme-secondary-fontColor { color:#ffffff; } 67 | .office-officeTheme-secondary-bgColor { background-color:#ea4400; } 68 | */ -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Excel-Add-in-JS-ExternalDataGitHubWeb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | 8 | 9 | 2.0 10 | {EDCFF522-BF4A-43EF-BA6A-A11FFE593A5E} 11 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 12 | Library 13 | Properties 14 | Excel_Add_in_JS_ExternalDataGitHubWeb 15 | Excel-Add-in-JS-ExternalDataGitHubWeb 16 | v4.5 17 | true 18 | 44332 19 | 20 | 21 | 22 | 15.0 23 | 24 | 25 | true 26 | full 27 | false 28 | bin\ 29 | DEBUG;TRACE 30 | prompt 31 | 4 32 | 33 | 34 | pdbonly 35 | true 36 | bin\ 37 | TRACE 38 | prompt 39 | 4 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Web.config 63 | 64 | 65 | Web.config 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 10.0 346 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | True 356 | True 357 | 61497 358 | / 359 | http://localhost:61497/ 360 | False 361 | False 362 | 363 | 364 | False 365 | 366 | 367 | 368 | 369 | 376 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Images/Close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Excel-Add-in-JS-ExternalDataGitHub/25dd8bed0fced9f309d33549cb5ea186464c6b5e/Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Images/Close.png -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Excel_Add_in_JS_ExternalDataGitHubWeb")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Excel_Add_in_JS_ExternalDataGitHubWeb")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a9a96d4b-1507-401f-afc1-0aad0725ff02")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Visual Studio Proj/Excel-Add-in-JS-ExternalDataGitHubWeb/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /images/ExternalDataGitHub_data.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Excel-Add-in-JS-ExternalDataGitHub/25dd8bed0fced9f309d33549cb5ea186464c6b5e/images/ExternalDataGitHub_data.PNG -------------------------------------------------------------------------------- /images/ExternalDataGitHub_taskpane.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Excel-Add-in-JS-ExternalDataGitHub/25dd8bed0fced9f309d33549cb5ea186464c6b5e/images/ExternalDataGitHub_taskpane.PNG --------------------------------------------------------------------------------