We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

workbook.getFonts() will show additional font after reload the same spreadsheet

we have tested the newest version of aspose.cells for java 17.4.0, and the test file is attached.



This test is just to test the font sizes when reload the same spreadsheet multiple times, using workbook.getFonts()

Here is the code:

@Test

public void testAsposeWorkbookFontag() throws Exception {

Workbook workbook = new Workbook(“AsposeTestSheet.xlsx”);

System.out.println("initial fonts " + workbook.getFonts().length);

for (int i=2; i
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();

workbook.save(byteStream, new OoxmlSaveOptions(SaveFormat.XLSX));

byte[] bytes = byteStream.toByteArray();

workbook = new Workbook(new ByteArrayInputStream(bytes));

System.out.println("reload the same spreadsheet time " + i + " fonts " + workbook.getFonts().length);

}

}

By looking at the following print out, you can tell every reload will add a font

initial fonts 3

reload the same spreadsheet time 2 fonts 6

reload the same spreadsheet time 3 fonts 7

reload the same spreadsheet time 4 fonts 8

reload the same spreadsheet time 5 fonts 9

reload the same spreadsheet time 6 fonts 10

Hi,


Thanks for your posting and using Aspose.Cells for Java.

We were able to observe this issue after executing your code with your sample Excel file as per your description and logged it in our database for a fix.

This issue has been logged as

  • CELLSJAVA-42284 - Workbook.getFonts() shows additional font after reload the same spreadsheet

Hi,


This is to inform you that your issue (logged earlier as “CELLSJAVA-42284”) has been fixed now. We will soon provide you the fixed version (Download link can be shared here in the next 3-5 days or so) after performing QA and incorporating other enhancements and fixes.

Thank you

The issues you have found earlier (filed as CELLSJAVA-42284) have been fixed in Aspose.Cells for Java 17.5.


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

I retested with the Aspose.Cells version 17.5.0, it is supposed to be the fixed version, but I get the following results

initial fonts 3
reload the same spreadsheet time 2 fonts 5

I expect the second time should be 3.

Hi,


You are right. The issue is still not fixed completely. I used your original code with the template file and the output is not expected. I have reopened your issue “CELLSJAVA-42284” now. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.
Hi,

This is to inform you that we have fixed your issue "CELLSJAVA-42284" now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Thank you.