Hi Team,
When we are trying to convert the attached excel the data of cells is overlapping with Chart.
Please can you look at this issue.
For your reference I have attached a sample file and snapshot of PrintPreview.
Thanks,
Ashish Sharma
Hi Team,
When we are trying to convert the attached excel the data of cells is overlapping with Chart.
Please can you look at this issue.
For your reference I have attached a sample file and snapshot of PrintPreview.
Thanks,
Ashish Sharma
Hi,
Hi,
The source
file you provided is strange. It’s different when we open in Excel 2003 and
Excel 2010. Please refer to the attachments.<o:p></o:p>
For this case, we follow the specification that makes .xls to be the same as Excel 2003 and .xlsx same as Excel 2010.
You may set the size of plot area to make the text not overlapping before converting the file to PDF or image.
Chart chart = book.Worksheets[0].Charts[0];
chart.PlotArea.Height = 4000;
Thank you.
Hi
Thanks for the workarond, but this will only work if we know the size of each and every chart in each excel file (It may happen that the workaround that you have provided will work for this xlsx file may not work for other files,it will not be feasible for us to change the code for this excel file.)
I have also tried with "XLSX" version of the same file.
But Aspose is sill not able to generate the pdf correctly(still some text is overlaping with chart.)
For you reference I have attached sample file.
Thanks,
Ashish
Hi,
Hi
we are using 8.3.2.1 Aspose.Cells still it is not giving expected output.
Thanks,
Ashish
Hi,
MemoryStream toBeConvertedToPdf = new MemoryStream(File.ReadAllBytes(@"C:\ChartOverlappingWithData.xls")); MemoryStream pdfStream = new MemoryStream(); Workbook originalWorkbook1 = new Workbook(toBeConvertedToPdf); Aspose.Cells.PdfSaveOptions saveOptions = new Aspose.Cells.PdfSaveOptions(Aspose.Cells.SaveFormat.Pdf); originalWorkbook1.Save(pdfStream, saveOptions); File.WriteAllBytes(@"C:\ChartOverlappingWithData.pdf", pdfStream.ToArray());
Thanks,
Ashish
Hi,
For this case (XLS file format), we follow the specification that makes .xls to be the same as Excel 2003 and .xlsx same as Excel 2010.<o:p></o:p>
We think you may set the size of plot area to make the text not overlapping before converting the file to PDF or image.<o:p></o:p>
e.g
Sample code:
Chart chart = book.Worksheets[0].Charts[0];<o:p></o:p>
chart.PlotArea.Height = 4000;
Thank you.