We’re excited to announce two new solutions for Office Add-ins Patterns and Practices. These were recently put together for the Excel custom functions feature that was released to general availability (GA) on May 6. Â
Custom function batching patternÂ
If your custom functions call a remote service, you may want to use a batching pattern to reduce the number of network calls to the remote service. This is useful when a spreadsheet recalculates, and it contains many of your custom functions. Recalculate will result in many calls to your custom functions, but you can batch them into one or a few calls to the remote service. Â
- Try the code:Â Custom function batching patternÂ
- Read the docs:Â Batching custom function calls for a remote serviceÂ
Use storage to share data between custom functions and the task paneÂ
If you need to share data values between your custom functions and the task pane, you can use the OfficeRuntime.storage object. Custom functions and task panes do not share the same runtime and cannot access the same data. OfficeRuntime.storage saves simple key/value pairs that you can access from both custom functions and the task pane. Â
- Try the code:Â Using storage to share data between custom functions and the task paneÂ
- Read the docs: Save and share state in custom functions Â
Contributors from MicrosoftÂ
Here’s the list of Microsoft people who have been closely involved with the PnP work during last month.Â
- Michelle Scharlock @mscharlockÂ
- Zlatko Michailov @zlatok-michailovÂ
- Michael Zlatkovsky @zlatkovskyÂ
- David Chesnut @davidchesnutÂ
- Hidetake Jo
About Office Add-ins Patterns & Practices (PnP)Â
Office Add-ins PnP is a Microsoft led, community driven effort that helps developers extend, build, and provision customizations on the Office platform the right way by providing guidance and help through official documentation and open source initiatives. The source is maintained in GitHub where anyone can participate. You can provide contributions to the samples, reusable components, and documentation. Office Add-ins PnP is owned and coordinated by Office engineering teams, but the work is done by the community for the community.Â
You can find code samples for Office Add-in development in the Office Add-ins PnP repo. Some samples are also documented in the Office Add-ins docs, such as Batching custom function calls for a remote service.Â
SharePoint PnPÂ
Office Add-ins PnP and SharePoint PnP are both related community driven efforts. SharePoint PnP provides community solutions for developers building on SharePoint.  For more information about SharePoint PnP, see https://docs.microsoft.com/en-us/sharepoint/dev/community/communityÂ
Additional resourcesÂ
- Get started with Office development by joining the Office 365 developer program.Â
- Try out some samples and get coding quickly with Office add-ins by downloading Script lab.
- Learn more by joining the monthly Office Add-ins community call.Â
Â