@peyton.xu, I see what you’ve pointed out. I’ve managed to fix that on my end. Thank you!
The issues you have found earlier (filed as CELLSNET-56198,CELLSNET-56278,CELLSNET-56280,CELLSNET-56282) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi
Hi, Aspose team.
I did some more testing and looks like all of the issues I previously reported have been fixed in this new release. Unfortunately, I have noticed another issue.
In most of the images that aspose captures, the font size if much smaller compared to what is in excel. And also in some cases, the font seems to be substituted with another font.
Test.zip (9.3 MB)
@JThomas98
We can reproduce the issue by testing on the latest version v24.8 using sample files and the following sample code. I found that the text became smaller when converting the file to an image. Please refer to the attachment. out_net.jpg (139.3 KB)
//Load the Excel file
Workbook workbook = new Workbook(filePath + "ChartTest.xlsm");
// Access the worksheet
Worksheet worksheet = workbook.Worksheets["ExecSummary"];
// Set the print area with your desired range in the worksheet
worksheet.PageSetup.PrintArea = "C3:D23";
// Set OnePagePerSheet option as true
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.OnePagePerSheet = true;
options.ImageType = ImageType.Jpeg;
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
string dataDir = filePath + "out_net.jpg";
sr.ToImage(0, dataDir);
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-56510
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.
In addition, The charts int the sample file use Theme font. Please refer to the attachment. chart_body.jpg (99.7 KB)
If Theme Font is selected, the font name will display different in different regions . If you do not want that the font is automitally changed in different regions, don’t select the Theme Fonts . Regarding theme fonts, please refer to the following document.
@JThomas98
We also found some of the text in the chart and font rendering are not the same as Excel. 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-56511
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.
Thank you for looking into it. Looking forward to the fix.
Because FitToPageWide and FitToPageHeight is set in PageLayout in the source file, the page content will be scaled during output, so the font size may be smaller. Also, the output of Aspose.Cells mathes the printview in Excel or the pdf manually saved by Excel.
ChartTest_SavedByExcel.pdf (132.1 KB)
Also, if you want to the output of Aspose.Cells matches what you see with NormalView in Excel, please also enable ImageOrPrintOptions.OnlyArea
, the output will be closer to the NormalView in Excel.
I tried the OnlyArea property and here’s the output
Test.zip (1.6 MB)
If you compare it with the output from office interop, you’ll see that there seems to be an extra page added at the end of page 48.
And the text still seems to be smaller in some cases.
Thanks for the sample documents.
We noticed the problem, which involves an additional page being added at the location you specified. We have recorded your sample documents against your issue (Ticket ID: “CELLSNET-56510”) in our database. We will investigate the matter and provide you with new updates.
It seems that you export Excel file to Emf image, and then insert the Emf image into Word document.
When OnlyArea is enabled, the width and height of generated image is changed, also the aspect ratio of the image is changed. It results the blank line below the image in the Word document moved to the next page.
Could you please share how do you generate the Emf image by office interop? Let’s take “Table1” section for example.
Hi @JThomas98
CELLSNET-56511 ( Some of the text in the chart, font rendering is not the same as Excel ) is fixed, the effect is as follows.
It will take effect in 24.9.
Fix240827.png (84.1 KB)
I tried the office compatible emf while converting the excel range to image just to see if the quality was better or if the formatting were more accurate.
In office interop, these charts are inserted as links using the paste special feature and the program updates the link to template excel workbook with the workbook that contains the actual data. And once the links are updated, the link is broken using microsoft interop.
This is looking good. Thank you!
Thanks for your confirmation on the issue (“CELLSNET-56511”).
Thanks for providing details. We will look into it and get back to you.
I have deeply looked into the Emf images in your shared “Office_Output.docm” file, the Emf images have the same view as the Normal View of source “ChartTest.xlsm” in Excel.
Enable OnlyArea
is the closest approach to match the Normal View in Excel, even though there are still some differences. For the extra page added at the end of page 48 in Word document after enabling OnlyArea
option, you may need to modify the Word document template.
I see. I’ll run some more tests on my end with OnlyArea enabled. In terms of the font size, I dont think OnlyArea does any difference. The size of the font still seems smaller compared to what is in excel. Is there a work around for it?
We have recorded your findings/details related to your issue (Ticket ID: “CELLSNET-56510”) in our database. We will analyze it further and respond to you.