Hi, I am using Aspose.cell (version: 19.12) to operate excel to snip the specified area and generate a picture. The picture can be generated normally in Windows, but it is blank when generated in Linux.
How can I generate the picture correctly in Linux environment? Please see attached code for reference. Thanks. Excel to PNG Sample.zip (83.4 KB)
@fryan,
I have tried this scenario in Linux environment but could not observe the issue. I found a little issue in the code mentioned below:
String sheetName="Output";
I got the blank image of 0 bytes however if we check the sheet name it contains a space after the sheet name so above line of code was changed as follows:
String sheetName="Output ";//Notice the space at the end of sheet name
After this change when I executed code, I got proper image. Could you please give it a try and share the feedback.
@fryan,
Following is the OS version detail where image is created successfully. You may please try with some other sample Excel file as well and share the feedback.
@fryan,
You may please try to convert the excel file to PDF in both the environments i.e. Windows and Linux and share the output files with us for our analysis.
Although title of your post is Excel to PNG but your sample code is converting to JPEG type image. You may please try using following line of code and test the scenario again.