Charts not rendering well in copying excels

Hi amjad/shakeel,

I am using Aspose.cells, I try to copy excels containing charts to another excels.I find that charts are not rendered well even the chart formats were not copied well. The same issue is found in converting Excels to Pdf.Even when converting excels to Pdf charts are not rendered well in pdf.Without solving this issue we cannot move ahead in our project.Kindly increase the Priority for this issue as this requirement needs to deployed Asap. Appreciate your help in this regard.

Thanks & Regards

Abdul R Sha.

Hi,


If you are using a .NET version of the product, please try the latest version: Aspose.Cells for .NET v7.0.2.1
If you are using Java version of the product, kindly download and use v7.0.2:
http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry335888.aspx


If you still find the issue, give us your template file and sample code to reproduce the issue on our end, we will check it soon.

Thank you.

Hi Could one of you share the contact telephone number so that we can have a quick and clear phone conversation on various issues we are facing in Excel Charts rendering and corresponding pdf generation.

Hi,

Please post your problem on Aspose.Cells forums, we will help
you asap. We provide you a forum support and live chat support. We do
not provide phone support.

Hi ,

We are trying to copy a chart from one excel to another but the charts are not get renedered well. Also we tried to convert a whole excel sheet to image, and still the charts are not rendered well in the destination image file. Could you help with this and get us any method where we could render charts well as either image or as charts(with same appearance as source) on the destination excel. This is very critical for us to complete our project.

Please find below the code samples and PDF and image file attachements.

1) convert an excel to PDF. - Issue :Charts not rendered properly

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook("C:\\MyTest.xlsx");

Aspose.Cells.License license = new License();

license.SetLicense("C:\\" + "Aspose.Cells.lic");

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(SaveFormat.Pdf);

pdfSaveOptions.OnePagePerSheet = true;

for (int i = 0; i < book.Worksheets.Count; i++)

{

book.Worksheets[i].PageSetup.FitToPagesWide = 1;

}

book.SaveOptions.ClearData = true;

book.Save("C:\\Output.pdf", pdfSaveOptions);

2) When i try to convert an worksheet to image. The charts are not rendered well in image.

Aspose.Cells.License license = new License();

license.SetLicense("C:\\" + "Aspose.Cells.lic");

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook("C:\\MyTest.xlsx");

Worksheet sheet = book.Worksheets[0];

Aspose.Cells.Rendering.ImageOrPrintOptions imgOptions;

Aspose.Cells.Rendering.SheetRender sr;

imgOptions = new Aspose.Cells.Rendering.ImageOrPrintOptions();

imgOptions.HorizontalResolution =100;

imgOptions.VerticalResolution = 100;

imgOptions.OnePagePerSheet = true;

imgOptions.IsImageFitToPage = true;

imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;

sr = new Aspose.Cells.Rendering.SheetRender(sheet, imgOptions);

sr.ToImage(0, "C:"+ "\\sheetimage" + ".tiff");

3) When copying one excel to another charts are not rendered well

Aspose.Cells.License license = new License();

license.SetLicense("C:\\" + "Aspose.Cells.lic");

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook("C:\\MyTest.xlsx");

Worksheet ws = book.Worksheets[0];

Aspose.Cells.Workbook New= new Aspose.Cells.Workbook(FileFormatType.Xlsx);

New.Worksheets[0].Copy(ws);

New.Save("C:\\NewFile.xlsx");

Attachments for 1st issue- MyTest.xlsx & Output.pdf

Attachments for 2nd issue - SheetImage.tiff

Attachment for 3rd issue- NewFile.xlsx.

Hi,

Thanks for your posting. We were able to reproduce the problem using the latest version:
Aspose.Cells for .NET v7.0.2.1

We will look into it and fix it and update you asap.

This issue has been logged as CELLSNET-40024.

Hi,

Please try the latest fix v7.0.2.6.


We have improved the chart for chart2image feature. But converting to pdf is still not work fine. We will continue to look into it.


Thank you.

Hi,

Please try the fixed version: v7.0.2.7,

Please try to set the ChartImageType = PNG as a workaround, it will work:

Sample codes:

PDF:
PdfSaveOptions option= new PdfSaveOptions();
option.ChartImageType = System.Drawing.Imaging.ImageFormat.Png;
wb.Save("XXX.pdf",option);
TIFF:
ImageOrPrintOptions iop = new ImageOrPrintOptions();
iop.SaveFormat = SaveFormat.TIFF;
iop.ChartImageType = ImageFormat.Png;
SheetRender wr = new SheetRender(wb.Worksheets[0], iop);
wr.ToImage(0, "XXX.tiff");

Thank you

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)