@JThomas98
You are welcome. If you have any questions, please feel free to contact us at any time.
The issues you have found earlier (filed as CELLSNET-57839,CELLSNET-57943,CELLSNET-57742) have been fixed in this update. This message was posted using Bugs notification tool by leoluo
CELLSNET-57839: Legends Missing & Blue headers had vertical lines across it
Here’s a screenshot of the blue headers having vertical lines. I can confirm that the legends missing is no longer happening. But the second part of this ticket is still not resolved.
The area I’ve refernced in the screenshot is Summary!M10:AQ40
Test_03172025.zip (9.2 MB)
I tested your scenario/case using your attached file with the following sample code using Aspose.Cells for .NET v25.3 and it works fine and as expected. In the output image, the blue headers are not having vertical lines as you pointed out via screenshot.
e.g.,
Sample code:
Workbook workbook = new Workbook("e:\\test2\\Chart_Template.xlsm");
// Access the worksheet
Worksheet worksheet = workbook.Worksheets["Summary"];
// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "M10:AQ40";
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
// Clear any header/footer as they'll be captured when converting the worksheet to image
worksheet.PageSetup.ClearHeaderFooter();
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions()
{
OnePagePerSheet = true,
ImageType = Aspose.Cells.Drawing.ImageType.OfficeCompatibleEmf,
HorizontalResolution = 100,
VerticalResolution = 100,
OnlyArea = true
};
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
sr.ToImage(0, "e:\\test2\\MyOut.jpg");
Please find attached the output JPG file for your reference.
MyOut.zip (53.0 KB)
Workbook workbook = new Workbook("e:\\test2\\Chart_Template.xlsm");
// Access the worksheet
Worksheet worksheet = workbook.Worksheets["Summary"];
// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "M10:AQ40";
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
// Clear any header/footer as they'll be captured when converting the worksheet to image
worksheet.PageSetup.ClearHeaderFooter();
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions()
{
OnePagePerSheet = true,
ImageType = Aspose.Cells.Drawing.ImageType.OfficeCompatibleEmf,
HorizontalResolution = 100,
VerticalResolution = 100,
OnlyArea = true,
SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
};
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
sr.ToImage(0, "e:\\test2\\MyOut.jpg");
This is the code I’ve used. I think the smoothing mode is causing the vertical lines in blue headers. But I have to use this property as some of the charts contains shapes that need smoothing.
Thanks for sharing further details and code snippet.
I am able to reproduce the issue as you mentioned by using your code snippet with your template Excel file. I found, in the output image, the blue headers are rendered with vertical lines whereas in MS Excel, those lines are not appeared. This might be due to smoothing mode you set in code. Anyways, we require thorough evaluation of the issue.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-58039
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Thanks for confirming the issue.
Hi @JThomas98
CELLSNET-57841 (Wrong Font Issue) is fixed, the new output effect is as follows, it will take effect in version 25.4.
CELLSNET-57841-fix.png (26.0 KB)
This is looking good. Thanks for the update.
Thank you for the confirmation. We will update here when the official version 25.4 is available for you.
Hi, please take a look at the screenshots in this folder. Things highlighted in yellow are issues that have been reported previously and tickets for the same have been created and are open. The things highlighted in red are new issues I’ve noticed. I’ve mentioned the worksheet name and range of the corresponding charts in each of the screenshots.
Brief explanation of the issues:
- Font kerning seems to be off in every instance of aspose when compared to excel. Often times certain alphabets are rendered so close to each other that they’re difficult to read.
- In texts or titles that have underlines, the underlines are breaking. Not sure why this is happening. An observation is that this breaking of underlines happen when smoothing mode property is set to 2D high quality.
Test_03242025.zip (3.4 MB)
Thanks for the template Excel file and screenshots.
I tested your scenario/case using your template Excel file and following sample code. I could not find your mentioned (both) issues.
e.g.,
Sample code:
Workbook workbook = new Workbook("e:\\test2\\Chart_Template.xlsm");
// Access the worksheet
//Worksheet worksheet = workbook.Worksheets["Demographics"];
Worksheet worksheet = workbook.Worksheets["Summary"];
// Set the print area with your desired range in the worksheet
//worksheet.PageSetup.PrintArea = "D273:O305";
worksheet.PageSetup.PrintArea = "T4:AH33";
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
// Clear any header/footer as they'll be captured when converting the worksheet to image
worksheet.PageSetup.ClearHeaderFooter();
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions()
{
OnePagePerSheet = true,
ImageType = Aspose.Cells.Drawing.ImageType.OfficeCompatibleEmf,
HorizontalResolution = 300,
VerticalResolution = 300,
OnlyArea = true,
SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
};
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
//sr.ToImage(0, "e:\\test2\\fontkerning1.jpg");
sr.ToImage(0, "e:\\test2\\underline1.jpg");
Please find attached both output image files for your reference.
files1.zip (50.5 KB)
Do you see any issue with the attached files, please give us details? Also, share your code snippet to reproduce the issue on our end, we will check it soon.
Using the code you shared, I’ve created a few screenshots and highlighted the issue.
The png file named underline1 uses Horizontal and Vertical resolution of 300.
The png file named fontkerning1 uses Horizontal and Vertical resolution of 100 as this is what I use in my application.
Output.zip (306.2 KB)
Please try with the following code snippet:
Workbook workbook = new Workbook("e:\\test2\\Chart_Template.xlsm");
// Access the worksheet
//Worksheet worksheet = workbook.Worksheets["Demographics"];
Worksheet worksheet = workbook.Worksheets["Summary"];
// Set the print area with your desired range in the worksheet
//worksheet.PageSetup.PrintArea = "D273:O305";
worksheet.PageSetup.PrintArea = "T4:AH33";
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
// Clear any header/footer as they'll be captured when converting the worksheet to image
worksheet.PageSetup.ClearHeaderFooter();
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions()
{
OnePagePerSheet = true,
ImageType = Aspose.Cells.Drawing.ImageType.OfficeCompatibleEmf,
HorizontalResolution = 100,
VerticalResolution = 100,
OnlyArea = true,
SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
};
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
//sr.ToImage(0, "e:\\test2\\fontkerning1.jpg");
sr.ToImage(0, "e:\\test2\\underline1.jpg");
Thanks for providing further details, screenshots and code snippets.
I was able to reproduce the issues as you mentioned (via screenshot) when using your sample Excel file and sample code snippets. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s):
- CELLSNET-58093 - Font kerning for certain text seems to be off when compared to Excel
- CELLSNET-58094 - Underlines are breaking in texts or titles when rendering sheet to image
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@JThomas98
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-58128
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hi @JThomas98
For the issue of arrow style, we have recorded it as CELLSNET-58128 ( Optimize the style of the line arrow) and resolved it. The result is shown in the figure, and it will take effect in version 25.4.
arrow-fix.png (3.4 KB)
For CELLSNET-57840, it contains several issue:
1, font type is different in both sets of chart.
This issue has been addressed and resolved in “CELLSNET-57841 (Wrong Font Issue)”, you can confirm it after using the 25.4 version.
2, Labels moved for small proportions in Pie chart.
3, missing labels on bottom-left bar chart.
4, font kerning is reduced in some chart labels.
The results of the repair are shown in the following figure.
CELLSNET-57840-fix.png (251.5 KB)
For the position of the labels around the pie chart, since the label position in Excel is automatically placed (unless you manually drag it and save it). This auto-placement rule, Excel did not make it public, so we are trying to approximate it as close as possible for now.
In the picture above you can see that some of the labels positions have been optimized but some are still not the same as in Excel. This work was previously recorded in “CELLSNET-57939 - The position of the pie chart label is incorrect when converting chart to image”. So we will close “CELLSNET-57840” and to track this task in “CELLSNET-57939”.
@JThomas98
For CELLSNET-57938 ( The top value of the first bar chart on the right has been cropped), the optimization results are as follows, and it will take effect in version 25.4.
CELLSNET-57938-fix.png (43.0 KB)