Custom Functions in Excel

Slides:



Advertisements
Similar presentations
Understanding Office MAC: What Windows Admins need to know
Advertisements

1/10/2018 9:33 PM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO.
4/12/2018 5:44 PM BRK3354 Using custom themes and designs to standardize the creation of clean, functional SharePoint sites Sean Squires
Make your app a native part of Office with Add-ins
Microsoft Ignite /10/2018 3:38 AM
Office Add-ins: Make your solution a native part of Office
Microsoft Ignite /16/2018 3:12 PM BRK2119
Office 365 Developer Overview
5/21/2018 9:40 PM BRK3021 Learn about modern infrastructure roles in RDS: Next generation Windows desktop & app virtualization Clark Nicholson - Principal.
Microsoft /23/2018 8:20 PM THR3038 Implement dev and test scenarios using Azure and Visual Studio Team Services Alex Mang Azure MVP © 2016 Microsoft.
Providing reliable SMB shares in Microsoft Azure
5/27/ :57 PM Tips & Tricks for Deploying and Managing Microsoft Dynamics 365 for Sales and Service Sean McNellis Shawn Dieken Dynamics 365 Principal.
Azure File Sync Setup, configuration and management
Working With Azure Batch AI
Use any Amazon S3 application with Azure Blob Storage
Building Custom Application With Office Add-Ins for OneNote
Microsoft /4/2018 8:21 AM BRK3082 Build solutions and apps with Microsoft OneDrive API and Microsoft Graph API Ryan Gregg Principal Program Manger,
Microsoft /4/ :15 PM THR2219 How Microsoft IT enables modern mobility with Windows 10 security and productivity features Rekha Nair IT Program.
Configure and Manage Your Hybrid Cloud Environment at Scale
Web development productivity with Visual Studio
WebView: Bringing the web to your app
Discover the New SharePoint Content Publishing Experiences
Microsoft /26/2018 6:05 PM BRK3044 Integrate line of business services with Outlook on Windows, Mac and web Andrew Salamatov Bharathan Venkateswaran.
Azure Functions and Automation: The SQL Agent in the Cloud
The power of common identity across any cloud
Microsoft Ignite /18/2018 8:30 PM BRK2065
Outlook Message Cards Ignite 2016 deck draft Shivakumar Seetharaman
Microsoft Ignite /22/2018 3:27 PM BRK2121
8/2/2018 4:49 AM Understanding the SharePoint Framework and how it affects your JavaScript customizations Mark Rackley / Chief Strategy.
Get Started with Common Data Model (CDM) and PowerApps
Customizing the Start Menu in Windows 10
ASP.NET in Linux and Windows containers
Serverless Architecture in Azure
Microsoft Ignite /13/2018 7:38 PM BRK2247
Troubleshooting Windows 10 Deployment: Top 10 Tips and Tricks
9/14/2018 2:22 AM THR2026 Set up secure and efficient collaboration for your organization with Office 365 Joe Davies Senior Content Developer Brenda Carter.
Monitor your Microservices with Application Insights
9/20/2018 2:30 PM BRK2279 Everything you need to know about the new Windows Server release cadence Chris Van Wesep, Director Product Marketing Jeff Woolsey,
Drive productivity with OneDrive and SharePoint file collaboration
Microsoft /7/2018 1:14 PM BRK2045 Explore new personal, intelligence powered search experiences in SharePoint, Delve and Office 365 Alina Skarbovsky.
Deploy Windows 10 Mobile for the mobile workforce
Microsoft Ignite /9/2018 5:03 AM BRK1010
Master Windows 10 Deployments - Expert Level
Protect your OneDrive and SharePoint files on mobile devices
Microsoft Ignite /14/ :21 AM BRK2101
Meetup: Use Microsoft Technologies to Real World IoT Scenario
Migrate to CRM Online - Tips and Tricks
Myth Busting: Top 5 Web App Myths
Office Add-ins Sudheer Maremanda Program Manager
F5 WAF in Azure Security Center
Excel JavaScript API Update
Microsoft Ignite /20/2018 2:21 PM
Effective report authoring using Power BI Desktop
Microsoft Ignite /24/2018 1:12 PM THR2008
Hosted Web Apps with Windows App Studio
Improve Office 365 Adoption: Top 10 Ways
Discover what’s new and what’s coming to SharePoint Modern Team sites
12/1/2018 2:29 AM How Microsoft does IT: Empower your teams with secure devops in the cloud Seth Malcolm IT Showcase © Microsoft Corporation. All rights.
TechEd /2/2018 5:42 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Office 365 Secure Score: Actionable Security Analytics
Can I get a side of OneDrive for Business with my SharePoint?
What query folding means to self-service BI projects
Meetup User Experience Design for SharePoint
Surviving identity management in a hybrid world
Ask the Experts: Windows 10 deployment, servicing, and provisioning
Learn how to leverage the Microsoft Store for Education in your school
Choosing between Microsoft PowerPoint & Sway
Microsoft Build /8/2019 6:29 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Understand the impact of the future of SharePoint
OneDrive Unplugged A panel discussion on all things OneDrive
Presentation transcript:

Custom Functions in Excel 5/13/2018 2:45 PM Custom Functions in Excel Michael Saunders Program Manager © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo The Chocolate Factory 5/13/2018 2:45 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Introducing custom functions 5/13/2018 2:45 PM Introducing custom functions run across all Excel platforms run JavaScript run fast look and feel like native Excel functions make web service calls (if desired) shipped by developers as part of an add-in run offline if they don’t depend on the web run even when the workbook is unattended Developer Preview coming soon: https://aka.ms/customfunctions © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Non-Developer Builders Who is the customer? Developers Non-Developer Builders 1. Develop add-in with custom functions 1. Author custom function in Excel 2. Publish to the store or enterprise 2. Enable for you or your team End-Users 3. Get, use, and manage in Excel 4. Share with others

Microsoft Build 2017 5/13/2018 2:45 PM Office Add-ins Extend Office applications across platforms using web technologies. Distribute via store or your company catalog via centralized deployment. (with Office.js) HTML manifest.xml Your own web app Office Add-in   © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Office Add-ins: Building Blocks Microsoft Build 2017 5/13/2018 2:45 PM Office Add-ins: Building Blocks Extension Points Add-in commands Custom functions x Pane title Containers Taskpane Dialog Content Dialog Title WebView Web Views (HTML/CSS/JavaScript) Use Office.js to interact with office © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

= Package and structure for add-ins + + Add-in manifest Packaged XML 5/13/2018 2:45 PM Package and structure for add-ins = Office add-in + + Add-in manifest Packaged XML Web page Dev-Hosted HTML JavaScript CSS Function code Packaged* JavaScript © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Function code function addTo42(num) { return num + 42; } 5/13/2018 2:45 PM Function code function addTo42(num) { return num + 42; } © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Function code (definition) 5/13/2018 2:45 PM Function code (definition) Excel.Script.CustomFunctions[“CONTOSO"] = {}; Excel.Script.CustomFunctions[“CONTOSO"]["ADDTO42"] = { call: addTo42, description: "Returns the sum of a number and 42", helpUrl: "https://example.com/help.html", result: { resultType: Excel.CustomFunctionValueType.number, resultDimensionality: Excel.CustomFunctionDimensionality.scalar, }, parameters: [{ name: "num", description: "The number be added", valueType: Excel.CustomFunctionValueType.number, valueDimensionality: Excel.CustomFunctionDimensionality.scalar, }], options: { batch: false, stream: false } }; © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Function code (registration) 5/13/2018 2:45 PM Function code (registration) Excel.run(function (context) { context.workbook.customFunctions.add(“CONTOSO.ADDTO42"); return context.sync(); }); © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Manifest code <Hosts> <Host xsi:type="Workbook"> 5/13/2018 2:45 PM Manifest code <Hosts> <Host xsi:type="Workbook"> <AllFormFactors> <ExtensionPoint xsi:type="CustomFunctions"> <Script> <SourceLocation resid="functionsjs" /> </Script> <Page> <SourceLocation resid="functionshtml"/> </Page> </ExtensionPoint> </AllFormFactors> </Host> </Hosts> <Resources> <bt:Urls>    <bt:Url id="functionsjs" DefaultValue="https://example.com/cf.js" />*    <bt:Url id="functionshtml" DefaultValue="https://example.com/cf.html" /> </bt:Urls> </Resources> © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/13/2018 2:45 PM Features © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Asynchronous functions 5/13/2018 2:45 PM Asynchronous functions Excel Developer JavaScript Developer Server function invocation return Promise HTTP request (if needed) HTTP response resolve Promise © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Asynchronous function 5/13/2018 2:45 PM Asynchronous function function getTemperature(thermometerID){ return Excel.Promise(function(setResult, setError){ getTempFromServer(thermometerID, function(data){ setResult(data.temperature); }); } © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Kevin Naidu Principal Architect – Sage 5/13/2018 2:45 PM Demo Kevin Naidu Principal Architect – Sage Financial Reporting with Custom Functions © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Streamed functions Excel Developer JavaScript Developer Server 5/13/2018 2:45 PM Streamed functions Excel Developer JavaScript Developer Server function invocation streaming (eg. WebSocket sendmessage) streaming (eg. Websocket onmessage) set result streaming (eg. Websocket onmessage) set result streaming (eg. Websocket onmessage) set result © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/13/2018 2:45 PM Streamed function function streamTemperature(thermometerID, interval, setResult){ function getNextTemperature(){ getTempFromServer(thermometerID, function(data){ setResult(data.temperature); }); setTimeout(getNextTemperature, interval); } getNextTemperature(); options: { batch: false, stream: true } © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Saving State var savedTemperatures{}; 5/13/2018 2:45 PM Saving State var savedTemperatures{}; function streamTemperature(thermometerID, interval, setResult){ if(!savedTemperatures[thermometerID]) refreshTemperature(thermometerID); function getNextTemperature(){ setResult(savedTemperatures[thermometerID]); // sends the saved value to Excel. setTimeout(getNextTemperature, interval); // wait before updating Excel again } getNextTemperature(); function refreshTemperature(thermometerID){ sendWebRequestExample(thermometerID, function(data){ savedTemperatures[thermometerID] = data.temperature; }); setTimeout(function(){ refreshTemperature(thermometerID); }, 1000); // wait 1 second before updating the saved temperature for thermometerID © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Working with ranges function secondHighestTemp(temperatures){ 5/13/2018 2:45 PM Working with ranges function secondHighestTemp(temperatures){ var highest = -273, secondHighest = -273; for(var i = 0; i < temperatures.length;i++){ for(var j = 0; j < temperatures[i].length;j++){ if(temperatures[i][j] >= highest){ secondHighest = highest; highest = temperatures[i][j]; } else if(temperatures[i][j] >= secondHighest){ secondHighest = temperatures[i][j]; return secondHighest; parameter[0].valueDimensionality = Excel.CustomFunctionDimensionality.matrix; © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Output ranges function trackTemperature(thermometerID, setResult){ 5/13/2018 2:45 PM Output ranges function trackTemperature(thermometerID, setResult){ var output; for(var i = 0; i < 50; i++) output[i] = 0; function recordNextTemperature(){ getTempFromServer(thermometerID, function(data){ output.push([data.temperature]); output.shift(); setResult(output); }); setTimeout(recordNextTemperature,500); } recordNextTemperature(); result.valueDimensionality = Excel.CustomFunctionDimensionality.matrix; © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Without batching: Excel Office JavaScript API Add-in/custom function User enters function with parameter a Calculates function with parameter a User enters function with parameter b User enters function with parameter c Result x displays Calculates function with parameter b Result y displays Calculates function with parameter c Result z displays

With batching: Excel Office JavaScript API Add-in/custom function Batching controller User enters function with parameter User enters function with parameter Translate to JavaScript Array User enters function with parameter Extracts parameters and optimizes calculation for all parameters Batch result dispatcher Result x displays Result y displays Result z displays

Batching* function getTemperature(thermometerIDs){ 5/13/2018 2:45 PM Batching* function getTemperature(thermometerIDs){ return Excel.Promise(function(setResult, setError){ getTempsFromServer(thermometerIDs, function(data){ setResult(data.temperatures); }); } options: { batch: true, stream: false } © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Sneak peek: Azure ML Functions 5/13/2018 2:45 PM Sneak peek: Azure ML Functions © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/13/2018 2:45 PM Roadmap © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

October: Developer Preview 5/13/2018 2:45 PM October: Developer Preview Go to aka.ms/customfunctions to sign up for updates Features: Cell references, async functions, streaming, ranges Next few months Watch for updates and announcements on aka.ms/customfunctions Give us feedback Features: Other Excel platforms, batching, cancelation 2018 We’ll announce general availability Allow deployment to Store and enterprise Features: More platforms, local JavaScript runtimes, offline runtime © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Please evaluate this session Your feedback is important to us! 5/13/2018 2:45 PM Please evaluate this session Your feedback is important to us! The slide will be replaced onsite through Silver Fox Productions with an updated QR code. This slide is required. Do NOT delete or alter the slide. From your PC or Tablet visit MyIgnite at http://myignite.microsoft.com From your phone download and use the Ignite Mobile App by scanning the QR code above or visiting https://aka.ms/ignite.mobileapp © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.