The following topics shall be covered in this article:
This Node.js Excel library is rich-featured and offers complete documentation regarding installation and its usage. So, run the following commands to install this API in your Node.js project.
npm install java npm install aspose.cells
The second option is to download the API package and enable this library in your Node.js project.
Convert Excel to SVG in Node.js
Sometimes you do not have the MS Excel installed in your system and unable to access the data files. Therefore, it is important to convert Excel to SVG so that files can be viewed easily.
You may follow the following steps to perform Excel to SVG conversion programmatically:
- Create a Workbook object and load the source file.
- Initialize an instance of the ImageOrPrintOptions class to access additional image creation options.
- Convert each worksheet into SVG format in a single page by calling setSaveFormat method.
- Invoke this setOnePagePerSheet method to put all content of one sheet to only one page.
- Convert each worksheet into svg format by calling SheetRender method.
- Call this toImage method to output the worksheet into Svg image format.
You can see the output in the image below:
Get a Free License
You can get a free temporary license to try the API beyond evaluation limitations.
We are ending this blog post here. You have learned how to convert Excel to SVG in Node.js programmatically. In addition, we have enlisted all the steps that demonstrate the API methods. Moreover, you may visit documentation of this Node.js Excel library to know other prominent features. Further, you may check the “See Also” section below for relevant articles. Finally, please visit conholdate.com for the latest updates.
Ask a question
You can let us know about your questions or queries on our forum.
Can you export Excel as SVG?
What programs can convert to SVG?
Copy & paste this code snippet into your main file that converts Excel to SVG programmatically.