dvector
1
Hi,
I have a file with superscript in the same cell as a normal text.
File: Superscript.zip (19.6 KB)
I am using this code:
Worksheet sheet = book.getWorksheets().get(“Sheet1”);
Cells cells = sheet.getCells();
Cell a1 = cells.get(“A1”);
System.out.println(a1.getStyle().getFont().isSuperscript());
the output is:
false.
Can you please help?
@dvector,
Please try following code and then let us know your feedback.
Workbook workbook = new Workbook(dataDir + "superscript.xlsx");
Worksheet sheet = workbook.getWorksheets().get("Sheet1");
Cells cells = sheet.getCells();
Cell a1 = cells.get("A1");
FontSetting[] settings = a1.getCharacters();
for (int i = 0; i < settings.length; i++) {
com.aspose.cells.FontSetting setting = settings[i];
System.out.println(setting.getFont().isSuperscript());
}