Fact labels overlapping in the merged cell

Hi Team,

The fact labels are found to be overlapping in the blue colored merged row attached in the screenshot.

Please help us on this issue.

Thanks in advance

Hi,

Thanks for your posting and using Aspose.Cells.

Please provide us your source excel file as you have shown in your screenshot so that we could look into it and test this issue at our end.

Please also download and try the latest version: Aspose.Cells for Java v8.7.1.4
and see if it makes any difference.

Hi Team,

Please look into the PPT attached with this reply since the issue does not exist with spreadsheet and help us in resolving the issue.

This PPT has been generated with the latest version of jar mentioned above.

Thanks in advance.


Hi,

Thanks for your posting and using Aspose.Cells.

We are afraid, your issue is not replicable on our Windows environment. We need to prepare your environment at our end to replicate and log this issue in our database.

Please see the following post in your other thread for a reference.

( Legend merging above the table in PDF )

Hi,
Pls find attached the source xls file and the generated EMF file.
Also attaching the comparison screenshot.
Pls find below the code used to convert the XLS to EMF.

---------------
Workbook workbook = new Workbook(String.valueOf(“C:/D/test/ImageConvert/InputXls_for_image_conversion.xlsx”));
Worksheet worksheet = workbook.getWorksheets().get(“Chart”);
if(null == worksheet)
worksheet = workbook.getWorksheets().get(0);

worksheet.getPageSetup().setLeftMargin(0.0);
worksheet.getPageSetup().setRightMargin(0.0);
worksheet.getPageSetup().setTopMargin(0.0);
worksheet.getPageSetup().setBottomMargin(0.0);
worksheet.getPageSetup().setPrintArea(“A1:AC45”);

/***************Create Image START *****************************************************/
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setOnePagePerSheet(true);
imgOptions.setImageFormat(ImageFormat.getEmf());
imgOptions.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
imgOptions.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);


SheetRender sr = new SheetRender(worksheet, imgOptions);
ByteArrayOutputStream imageStream = new ByteArrayOutputStream();
sr.toImage(0, “C:/D/test/ImageConvert/generated_Image.emf”);

--------------

Thanks,
Prabu

Hi,

Thanks for your nice screenshots and providing us the document explaining the issue with clarity and using Aspose.Cells.

We were able to reproduce the issue with the following sample code using the latest version: Aspose.Cells for Java 8.7.2
and found that text labels are overlapping in the EMF image.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41801 - Text labels are overlapping in the EMF image

I have also attached the output emf image generated with the following code for a reference.

Java
String filePath = “D:/Downloads/InputXls_for_image_conversion.xlsx”;

Workbook wb = new Workbook(filePath);

Worksheet sh = wb.getWorksheets().get(“Chart”);

ImageOrPrintOptions opts = new ImageOrPrintOptions();
opts.setImageFormat(ImageFormat.getEmf());
opts.setOnePagePerSheet(true);

SheetRender sr = new SheetRender(sh, opts);
sr.toImage(0, “output.emf”);

Hi Team,

Please include the below issue also under the following ticket .

In the attached screenshots the headings present inside the table are getting truncated in PPT whereas it is working fine in excel.

I have attached the screenshots for your reference.

Thanks in advance.

Hi,

Thanks for your posting and using Aspose.Cells.

I have checked your previous excel files but could not find any file containing this image.

Attachment: REP 19 Excel.PNG

Please provide us excel file which contains this image as attached by you so that we replicate it at our end and log it in our database for a fix.

Hi Team,

I have attached another set of PPT image and corresponding Excel with this reply.

Please look into the issue and include it in the ticket.

Thanks in advance.

Hi,

Thanks for your sample excel file and using Aspose.Cells.

We were able to observe this issue by executing the following sample code using the latest version:
Aspose.Cells for Java v8.7.2.1 and found cells’ text is getting congested and overlapping in the EMF image.

We
have logged this issue in our database for investigation. We will look
into it and fix this issue. Once the issue is resolved or we have some
other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41810 - Text is getting congested and overlapping in the EMF image

I have also attached the output emf image generated with the following code for a reference.

Java
String filePath = “D:/Downloads/rep19_Excel.xlsx”;

Workbook wb = new Workbook(filePath);

Worksheet sh = wb.getWorksheets().get(“Chart”);

ImageOrPrintOptions opts = new ImageOrPrintOptions();
opts.setImageFormat(ImageFormat.getEmf());
opts.setOnePagePerSheet(true);

SheetRender sr = new SheetRender(sh, opts);
sr.toImage(0, “output2.emf”);

Hi Fayyaz,

Any update on this.

Regards
Prabu R

Hi,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no update for you regarding these issues at this moment. However, your issues are in progress and there exists some internal updates which are related to developers and not related to you.

However, we have logged your comment in our database against these issues and requested the product team to provide some ETA or fix for these issues. Once there is some news for you, we will let you know asap.

Hi,


This is to update you that both tickets attached to this thread has been resolved. We will shortly share the next revision of the API here after ensuring the quality and incorporating other enhancements.

Hi,

Thanks for your using Aspose.Cells.

We have fixed the issues CELLSJAVA-41810 and CELLSJAVA-41801.

Please download and try the latest fix:
Aspose.Cells for Java v8.8.0.2
and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-41810;CELLSJAVA-41801) have been fixed in this update.


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

Hi Team,

Thanks for the fix provided for this issue in Aspose.Cells for java 8.8.0.2 jar.

This works fine in Windows and have a problem in Unix Environment.

Could you please have a look into this issue in Unix environment.

Please find the attached screenshots of the issue in both Windows and Unix environments and also the sample excel for your testing purpose.

Regards,
Sanjeev

Hi Sanjeev,

Thanks for your posting and using Aspose.Cells.

I have checked your LabelsOverlapping.XLSX with your images (Windows Result.jpg, UNIX Result.jpg) and found they do not match. Please make sure, you have provided me correct LabelsOverlapping.XLSX file. I have also attached the screenshot of your source file.

Please see on non-Windows environment like Unix, you have to place your font files in some directory and then set the font directory like

CellsHelper.setFontDir(“/usr/temp/myFonts”);

before executing your program. If you will not do it, you will get incorrect results.

Please see the following documentation article for your reference.

( How to Specify TrueType Fonts Location|Documentation )

Dear Shakeel Faiz,

Thanks for the suggestion.

The excel ( LabelsOverlapping.XLSX) file is the correct one.

I’ve checked for the fonts availability and the mapping. The respective Calibri font was already added and its corresponding directory was already mapped.

Could you please help us on how to proceed further in this scenario as this issue is a major one in production which is effecting our business.

Regards,
Sanjeev

Hi Sanjeev,


Thank you for sharing more information.

We have evaluated the recently shared scenario on CentOS 6.5 against JDK 1.7 & Aspose.Cells for Java, revisions 8.8.1 & 8.8.2.2 (latest at moment). We are able to replicate the said problem while rendering the worksheet to EMF format, however, issue does not seem to happen if rendered result is saved in raster image formats, such as PNG (check the attached archive for images generated during our testing). We have logged this incident as CELLSJAVA-41852 in our bug tracking system for further investigation & correction purposes.

That said, the images you have shared also suggests that you are probably missing the required fonts in your environment or perhaps the fonts are not being picked correctly. You can troubleshoot this by rendering the given spreadsheet to PDF format and inspect the document properties for the embedded fonts. If you can find all the required fonts in Fonts tab of the PDF document properties then the fonts are getting picked correctly, otherwise, we would suggest you to set the font directory while using the Aspose.Cells.FontDirExc as demonstrated below and render the results again. Please note, the following statement should be at very start of your application, that is; before invoking any other class from Aspose.Cells for Java API.

Java

System.setProperty(“Aspose.Cells.FontDirExc”, dir + “fonts”); //fonts directory contains all Calibri TTFs at root

Hi,

Thanks for using Aspose.Cells.

Because the Calibri bold style font is used in your source file, please add Calibri Bold style font file (the file name is “calibrib.ttf” in Windows) to your font directory that be used by Aspose.Cells.API (e.g. CellsHelper.setFontDir(String value)), then convert the sheet to emf and let us know your feedback.

If it still does not work OK, it is important to share your generated emf file, font files used and the sample code you used.