We will cover the following sections:
The installation procedure of this API is quite simple and developer friendly. It offers powerful features regarding file conversion and file manipulation. However, you can run the following commands to install this API in your Node.js project.
npm install java npm install aspose.cells
Otherwise, download the API package and integrate this library into your Node.js project.
Convert Excel to PNG in Node.js
You may follow the following steps and the code snippet:
- Create an Workbook object and load the source file.
- Instantiate an instance of the ImageOrPrintOptions class to access additional image creation options.
- Set the image type by calling setImageType method.
- Invoke the get(index) method to get the first worksheet.
- Create a SheetRender object for the target sheet.
- Invoke the toImage method to generate an image for the worksheet.
You may see the output in the image below:
Get a Free License
You may get 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 Excel to PNG?
How do I turn Excel data into an image?
Invoke this toImage method to generate an image from an Excel Worksheet programmatically. In addition, visit this link to know other prominent methods of this library.