How to Create a Shared Excel File in Nodejs

How to Create a Shared Excel File in Nodejs

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:

JavaScript Excel API installation

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:

  1. Instantiate an instance of the Workbook class.
  2. setAutoRecover method indicates whether the file is marked for auto-recovery.
  3. setCheckCompatibility method indicates whether check compatibility with earlier versions when saving the workbook.
  4. setCrashSave method indicates whether the application last saved the workbook file after a crash.
  5. setRepairLoad method indicates whether the application last opened the workbook in safe or repair mode.
  6. Call this setShowTabs method to set a value whether the Workbook tabs are displayed.
  7. 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:

JavaScript excel API

Get a Free License

You can avail a free temporary license to try the API without evaluation limitations.

Summing up

This is the end of this tutorial blog post. You have gone through that how to create a shared Excel file in Nodejs programmatically. In addition, you also have seen the code snippet and the methods exposed by the JavaScript Excel API. Moreover, you may visit the documentation to know other features. There are other relevant links available in the “See Also” section below. Finally, stay connected with conholdate.com for regular updates.

Ask a question

You can let us know about your questions or queries on our forum.

FAQs

Can JavaScript create an Excel file?

Yes, you can easily install this JavaScript Excel library and create, manipulate and convert Excel files to other popular file formats programmatically.

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.

See Also