Migrate from the Excel service
The @openfin/excel NPM package supersedes the previous Excel service which is now deprecated.
The NPM package has a number of advantages over the service:
Advantage | Description |
---|---|
Lighter footprint | There is no "Add-in" component that requires installation in Excel. |
Runtime version consistency | The adapter process uses the same runtime version that the parent app uses. |
Improved isolation | Multiple apps that use different versions of the Excel Integration can be run at once. |
Simple configuration | By default no additional configuration is required unless you choose to self-host the adapter package. |
Standard upgrade path | Upgrading to newer versions is the same process as per any NPM dependency. |
Typescript support | The new client-side API is provided as an ES module including type definitions. |
The new client-side API is not a one-to-one match with the API provided by the service.
There are implementation as well as functional differences, some of which will be addressed in future releases.
Migration steps
If you are using the Excel service and wish to migrate your app to use the NPM package, follow these steps:
-
Review the API documentation and ensure that it meets the functional requirements of your app.
-
Make the required changes to your app:
-
Add the @openfin/excel NPM package as a dependency.
-
Remove any
script
tags referencing the Excel service API JavaScript file,fin.desktop.Excel.js
orExcelAPI.js
. -
Update your app's source code where it calls deprecated API statements and replace them as per the API documentation.
Note
The Excel RTD functionality has been replaced by data streams in the new Excel integration. Remember to factor in removing references to the
OpenFinRTD
function in all affected Excel workbooks, and replacing with the named cell ranges used by the data streams implemented in your app. -
If using a bundler (such as webpack), update your app’s bundling process to remove the Excel service API JavaScript file (if being included in the bundle) and ensure required files from the NPM package are included.
-
Update your app’s manifest to remove references to the "excel" service:
{... "services": [ {"name": "excel"} ] }
-
If required, update your app’s manifest to include the necessary API permissions (see Configure API security above).
-
If planning on self-hosting the adapter, update your app’s manifest to include the required
appAssets
entry (see Self-hosting the adapter above).
-
-
Optional: Remove the deprecated Excel service add-in from any desktop that ran the Excel service.
We recommend this step only if you know that no applications are targeting version 14.78.48.16 of the OpenFinRuntime. If you’re confident that is the case, please proceed with the following optional steps:
-
Locate where the add-in file resides and delete it. If you do not know its location, in Excel, click File > Options > Add-ins and find "OpenFin Excel API Add-In". Typically the location is
%LocalAppData%\OpenFin\shared\assets\excel-api-addin
. -
Close down Excel and then delete the entire `excel-api-addin`` folder.
-
Start Excel. If the preceding steps were done correctly, an alert appears stating that the OpenFin.ExcelApi-AddIn.xll add-in could not be found; click on OK to continue.
-
In Excel, click File > Options > Add-ins, and then select "Excel Add-ins" next to "Manage" and click Go.
-
Uncheck the "Openfin.Excelapi-Addin" option, and when yoare prompted to delete it from the list, click Yes.
-
Click OK to close the Add-ins window.
-
Delete this folder:
%LocalAppData%\OpenFin\cache\14.78.48.16
(Substitute your OpenFin installation folder path if different than this one.) -
Delete all folders that start with
Excel-Service-Manager
in the following folder%LocalAppData%\OpenFin\apps\
.
-
Updated 11 months ago