Aspose.Cells renders extra legend

Hi,



When rendering an Excel sheet into image, I noticed it rendered an extra legend which does not appear in the original Excel file.



Code:



var book = new Workbook(@“test.xlsx”);

Worksheet sheet = book.Worksheets[0];

var options = new ImageOrPrintOptions

{

ImageFormat = ImageFormat.Emf,

OnlyArea = false,

OnePagePerSheet = true

};

SheetRender sr = new SheetRender(sheet, options);

sr.ToImage(0, @“output.emf”);



Could you check this issue to see if it could be fixed?



Thanks,

Hi John,


Thank you for sharing the samples.

I have tried the case on my side, I am afraid, I am not able to notice any problem. Aspose.Cells have rendered the contents are they are shown in Excel application. Could you please highlight the problematic area in the resultant image as compared to the Excel view?

Hi,


I have evaluated your issue using your sample code with your template file a bit. I found an extra dottedd line appeared in the chart’s image, see the screenshot for your reference:
http://prntscr.com/cvcw3m

Are you referring to this issue (extra dotted line appeared on the chart/legend)?

Thank you.

Hi Amjad,



I think you might be using the evaluation version so the ‘dotted line’ is actually the Aspose’s evaluation version info.



However, I’ve provided the new test samples and a screenshot to point the difference.



Thanks

Hi,


Yes, sorry, it is actually evaluation details/info.

I did evaluate your issue further with a valid license and found the issue. But the issue is due to your line of code that specifies the OnlyArea attribute to set to “false”. Please specify the attribute to “true” so your desired output (which is shown as it is) should be produced. See the line in bold for your reference:
e.g
Sample code:

Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(“Aspose.Cells.lic”);
var book = new Workbook(@“e:\test2\test1.xlsx”);
Worksheet sheet = book.Worksheets[0];
var options = new ImageOrPrintOptions
{
ImageFormat = ImageFormat.Emf,
OnlyArea = true,
OnePagePerSheet = true
};
SheetRender sr = new SheetRender(sheet, options);
sr.ToImage(0, @“e:\test2\out1.emf”);

Let us know if you still has any issue.

Thank you.

Hi,



Thanks for your reply.



As far as I’m aware of, OnlyArea is to determine if the rendering is ‘Copy as Printed’. (edited: If the value is false then it’s copy as printed, and if it is true it’s copy as shown on screen).



I asked the question earlier in the other post and understood it is necessary to use this value as false when I want the image to be displayed as printed.



How to Copy as Picture - As shown when printed in Aspose



And also in Office Excel, copy this area either using ‘Copy Picture - As shown on screen’ or ‘Copy Picture - As shown when printed’ will not produce the extra legend. So the behavior from Microsoft Excel and Aspose are different here.



As I will need to render the output as printed, so I think I might not be able to set this value to true. Could you please help me to check if this is an issue?



Thanks

Hi,


Well, when you set “OnlyArea” to true, only the visible area (for shapes) will be rendered as image output and no scaling would take effect in that case. I will also check your case with the concerned member from product team to evaluate if this is an issue or expected results. In case, it is an issue, I will log a ticket for it and let you know here.

Thank you.

Hi John,


This is to update you that we have logged an investigative ticket with Id CELLSNET-44831 to look further into this matter. Please spare us little time to properly analyze the case and revert back with updates in this regard.

Hi again,


This is to inform you that the ticket logged earlier as CELLSNET-44831 has been marked resolved. We will shortly share the fix here for your testing.
Hi,

Thanks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v16.11.1.0 and let us know your feedback.

Hi,

Thanks for your update. I have tested the case using Aspose.Cells 16.11.1.0 and the issue didn’t seem to happen again.

I will be able to test with a full document once the .Net 4.0 version has been released. Thanks very much.

Hi,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

We have requested the product team to provide you .NET 4.0 compiled version if possible. Once, it is available, we will let you know asap. Otherwise, you will have to wait for Aspose.Cells official release which will be available in next month.

The issues you have found earlier (filed as CELLSNET-44831) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.