The following sections will be covered in this article:
This Node.js Excel library is powerful and offers enterprise-level features to process Excel files programmatically. You may visit the installation page to know the installation steps. However, you can either download the API package or install it by running the following commands:
npm install java npm install aspose.cells
Convert Excel to Markdown in Node.js
You may follow the steps and the code snippet below:
- Instantiate an instance of the Workbook class and load the source XLSX/XLS file.
- Create an object of the MarkdownSaveOptions class to manipulate the XLS/XLSX to .md conversion.
- If the value of the setCreateDirectory method is true and the directory does not exist, the directory will be automatically created before saving the file.
- Invoke the setClearData method to make the workbook empty after saving the file.
- Call this setLineSeparator method to set the line separator.
- Save as Markdown by invoking the save method.
Copy & paste the following code into your main file:
You can 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 convert an Excel table to Markdown?
How do you convert to Markdown?
In fact, you may visit this link to know the code snippet that converts Excel files to Markdown programmatically.