Export API
The Export API is used to provide custom export options such as Open in Excel
options that are manually added via the Export API.
In this recipe, we will show how to use the Export API to provide custom export options by adding an explicit button for Open in Excel
experiences. The label shown on the button should usually be Open target in Excel
where the target is the name of the target data, such as Vendors
or catalog
. The code behind such a button will be for obtaining the template to be used. Add the desired filter and pass the template to the user.
How to do it...
Carry out the following steps in order to complete this recipe:
- Start Visual Studio 2015 by opening the previously created project, or create a new project.
- Right-click on the project, and then click
Add
|New
item
. - Select the
Resource item type
and set the name toVendorBasicTemplate
. Make sure thatVendorBasicTemplate.xlsx
is closed. - Add a document template for usage in code.
- Add a new button
OpenVendorInExcel
on theVendTable...