If you are Git person, directly fork or contribute from here.
Lets directly get into action and see how it works,
Custom actionUse the below PowerShell CSOM script to add the custom action to your list, watch out for the hard coded url used in the form submit, you need replace it with your address of your nodeJS server.
Addin RegistrationIn Azure portal, register your application and give read access on SharePoint sites. Note down the client ID and client secret. For more details on registering the application in Azure AD, refer this article.
NodeJS configurationsUpdate the below details in the parameters.json
Install node dependencies
- "adal-node": ">= 0.1.17"
- "express": "4.13"
- "connect-logger": "0.x"
- "cookie-parser": "1.4"
- "cookie-session": "2.x"
- "msexcel-builder": "0.0.2"
- "unirest": "2.14.x"
- "body-parser": "2.14.x"
Peace! Happy Coding.
- Run the main.js in node to start the server.
- Your node instance is ready and starts listening the port configured.
- Go to your SharePoint Online site where the custom action has been added, and select few items in the list and select "export to excel' from the ribbon
- An excel file will be downloaded with the file name same as your list name with the selected items as rows