Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
FY23Q4 refresh - office-add-ins-excel
Browse files Browse the repository at this point in the history
- run through all exercise steps in associated MSLearn module to validate good working order
- updated steps & fixed typos where necessary
- updated slides where necessary
- update code samples to reflect MSLearn HOL exercise refresh & updates
- any & all users/names/company names/pictures/IDs are not real people/tenants... all are from M365 demo tenants provided by Microsoft
  • Loading branch information
andrewconnell committed May 5, 2023
1 parent 5078f24 commit fd304bb
Show file tree
Hide file tree
Showing 22 changed files with 12,785 additions and 10,794 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>2b1164f9-0a5c-4e70-bb25-e47c3327df18</Id>
<Id>f3c9b250-c713-490e-a19d-21c2c103813d</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@
"acorn": "^8.5.0",
"babel-loader": "^8.2.2",
"copy-webpack-plugin": "^9.0.1",
"eslint-plugin-office-addins": "^2.1.3",
"eslint-plugin-office-addins": "^2.1.5",
"file-loader": "^6.2.0",
"html-loader": "^4.1.0",
"html-webpack-plugin": "^5.5.0",
"office-addin-cli": "^1.5.3",
"office-addin-debugging": "^4.6.3",
"office-addin-dev-certs": "^1.9.3",
"office-addin-lint": "^2.2.3",
"office-addin-manifest": "^1.10.4",
"office-addin-cli": "^1.5.5",
"office-addin-debugging": "^5.0.5",
"office-addin-dev-certs": "^1.11.3",
"office-addin-lint": "^2.2.5",
"office-addin-manifest": "^1.12.3",
"office-addin-prettier-config": "^1.2.0",
"os-browserify": "^0.3.0",
"process": "^0.11.10",
"source-map-loader": "^3.0.0",
"ts-loader": "^9.4.1",
"typescript": "^4.7.4",
"webpack": "^5.73.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "4.7.4"
"webpack": "^5.76.3",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "4.13.1"
},
"prettier": "office-addin-prettier-config",
"browserslist": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
<h1 class="ms-font-su">Welcome</h1>
</header>
<section id="sideload-msg" class="ms-welcome__main">
<h2 class="ms-font-xl">Please sideload your add-in to see app body.</h2>
<h2 class="ms-font-xl">Please <a target="_blank" href="https://learn.microsoft.com/office/dev/add-ins/testing/test-debug-office-add-ins#sideload-an-office-add-in-for-testing">sideload</a> your add-in to see app body.</h2>
</section>
<main id="app-body" class="ms-welcome__main" style="display: none;">
<button class="ms-Button" id="create-table">Create Table</button><br/><br/>
<button class="ms-Button" id="filter-table">Filter Table</button><br/><br/>
<button class="ms-Button" id="sort-table">Sort Table</button><br/><br/>
<button class="ms-Button" id="create-chart">Create Chart</button><br/><br/>

</main>
</body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Office.onReady((info) => {
document.getElementById("sort-table").onclick = sortTable;
document.getElementById("create-chart").onclick = createChart;


document.getElementById("sideload-msg").style.display = "none";
document.getElementById("app-body").style.display = "flex";
}
Expand Down Expand Up @@ -64,6 +65,7 @@ async function filterTable() {
const expensesTable = currentWorksheet.tables.getItem('ExpensesTable');
const categoryFilter = expensesTable.columns.getItem('Category').filter;
categoryFilter.applyValuesFilter(['Education', 'Groceries']);
// Groceries and Education.

await context.sync();
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = async (env, options) => {
devtool: "source-map",
entry: {
polyfill: ["core-js/stable", "regenerator-runtime/runtime"],
taskpane: "./src/taskpane/taskpane.js",
taskpane: ["./src/taskpane/taskpane.js", "./src/taskpane/taskpane.html"],
commands: "./src/commands/commands.js",
},
output: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,57 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>2b1164f9-0a5c-4e70-bb25-e47c3327df18</Id>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>f3c9b250-c713-490e-a19d-21c2c103813d</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="My Office Add-in"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<DisplayName DefaultValue="My Office Add-in" />
<Description DefaultValue="A template to get started." />
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png" />
<SupportUrl DefaultValue="https://www.contoso.com/help" />
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
<Host Name="Workbook" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
<Title resid="GetStarted.Title" />
<Description resid="GetStarted.Description" />
<LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
</GetStarted>
<FunctionFile resid="Commands.Url"/>
<FunctionFile resid="Commands.Url" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label"/>
<Label resid="CommandsGroup.Label" />
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
<Control xsi:type="Button" id="ToggleProtection">
Expand All @@ -61,14 +65,14 @@
<Description resid="ProtectionButtonToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>toggleProtection</FunctionName>
</Action>
</Control>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
Expand All @@ -77,24 +81,26 @@
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png" />
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png" />
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
<bt:Url id="GetStarted.LearnMoreUrl"
DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group" />
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane" />
<bt:String id="ProtectionButtonLabel" DefaultValue="Toggle Worksheet Protection" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane"/>
<bt:String id="GetStarted.Description"
DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
<bt:String id="ProtectionButtonToolTip" DefaultValue="Click to protect or unprotect the current worksheet." />
</bt:LongStrings>
</Resources>
Expand Down
Loading

0 comments on commit fd304bb

Please sign in to comment.