MS Excel has been contributing to the modern world of technology regarding data storage and data representation. XLS/XLSX files are easy to maintain and come with cloud-friendly features. Most of the time, you must create shared Excel files to let others work on the same file. In big organizations, it is a prevalent task and required to save time and other costs. However, we will use this Node.js Excel library to demonstrate how to create a shared Excel file in Nodejs programmatically.
We will cover the following points:
You can create shared Excel files using this powerful library. It is easy to install and configure in your Node.js project. However, you can set up this library using two simple ways. So, you can either download the API package or install it by running the following commands in the terminal:
npm install java npm install aspose.cells
How to Create a Shared Excel File in Nodejs
Once the library is set up, you are all set to create shared Excel files programmatically.
You may follow the following steps and the code snippet:
- Instantiate an instance of the Workbook class.
- setAutoRecover method indicates whether the file is marked for auto-recovery.
- setCheckCompatibility method indicates whether check compatibility with earlier versions when saving the workbook.
- setCrashSave method indicates whether the application last saved the workbook file after a crash.
- setRepairLoad method indicates whether the application last opened the workbook in safe or repair mode.
- Call this setShowTabs method to set a value whether the Workbook tabs are displayed.
- Invoke the setShared method to share the Workbook.
Copy & paste the following code into your main file:
You may see the output in the image below:
Get a Free License
You can avail a free temporary license to try the API without evaluation limitations.
Ask a question
You can let us know about your questions or queries on our forum.
How do I create a shared file in Excel?
Feel free to visit this link to know how to create shared Excel files in Nodejs programmatically.