Using Aspose cells 25.3 we are running into an issue where some generated dashboards are not rendering correctly. Gridlines are present in the image extracted from the excel sheet when none are present in the original. In some cases the border color is different between the excel dashboard and generated image.
Excel:
Screenshot 2025-08-21 at 11.37.56 PM.png (29.1 KB)
Screenshot 2025-08-21 at 11.57.19 PM.png (4.3 KB)
Generated Image:
Screenshot 2025-08-21 at 11.38.18 PM.png (93.4 KB)
Screenshot 2025-08-21 at 11.58.19 PM.png (10.2 KB)
Generation Code:
Screenshot 2025-08-21 at 11.54.57 PM.png (93.3 KB)
Screenshot 2025-08-21 at 11.55.25 PM.png (86.7 KB)
@ahongVena
It sounds like you’re experiencing issues with gridlines and cell borders not rendering correctly when generating images from Excel files using Aspose.Cells. Here’s a structured approach to address the problem:
Cause: The rendering issues may stem from incorrect settings in the original Excel file, outdated Aspose.Cells version, or improper image rendering options.
Solution: Follow these steps to troubleshoot and potentially resolve the issue:
-
Check Excel File Settings: Ensure that the gridlines and borders are correctly set in the original Excel file. Display settings in Excel can affect how they are rendered in images.
-
Update Aspose.Cells: Since you are using version 25.3, update to the latest version of Aspose.Cells. Newer versions may include bug fixes or improvements related to rendering.
-
Image Rendering Options: When generating the image, use the correct rendering options. Here’s a sample code snippet to ensure gridlines are included:
Workbook workbook = new Workbook("path/to/your/file.xlsx");
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setOnePagePerSheet(true);
options.setGridlineType(GridlineType.Both); // Ensure gridlines are rendered
options.setQuality(100); // Set quality for better rendering
SheetRender sr = new SheetRender(workbook.getWorksheets().get(0), options);
sr.toImage(0, "outputImage.png");
-
Check for Overlapping Elements: Ensure there are no hidden or overlapping shapes in the Excel sheet that might affect the output.
-
Test with Different Formats: If the issue persists, try exporting the Excel file to different image formats (e.g., PNG, JPEG) to determine if the problem is specific to one format.
Next Steps: If these steps do not resolve the issue, please provide more details about your generation code and any specific settings you are using. This information will help in diagnosing the problem further.
Let me know if you need further assistance!
@ahongVena
We recommend you to kindly try using our latest version: Aspose.Cells for Java 25.8.
If you still find the issue, kindly do share your complete sample (runnable) code and template Excel file (if any) to reproduce the issue on our end, we will check it soon.