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

Free Support Forum - aspose.com

Java cells v 2.3.0 save as excel 2007 fails

i’ve just updated to v 2.3.0 of the java version of cells, and now all spreadsheets saved as Excel 2007 format are failing with this exception:

java.io.IOException: Illegal pattern character ‘T’

at com.aspose.cells.Workbook.save(Unknown Source)

at com.aspose.cells.Workbook.save(Unknown Source)

if i change the file format to “Excel 97 to 2003” they save fine.


Thanks for your post.

Can you please provide us some source template to reproduce the issue?

Kind Regards

hi - i’ve narrowed the issue down to the definition of pivot tables.

i’ve attached a sample excel document that the following code opens and trys to add a pivot table to. the workbook.save method will throw an exception.

Workbook workbook = new Workbook();

workbook.open("/test.xlsx", FileFormatType.EXCEL2007);

PivotTables pivotTables = workbook.getWorksheets().getSheet(“RawData”).getPivotTables();

Worksheet sheet = workbook.getWorksheets().getSheet(“RawData”);

int pti = pivotTables.add(workbook.getWorksheets().getRangeByName(“RawDataRange”).getRefersTo(), 0, sheet

.getCells().getMaxDataColumn() + 1, “RawDataPivot”);

PivotTable pt = sheet.getPivotTables().get(pti);


File f = new File("/tmp/test-out.xlsx");

FileOutputStream fos = new FileOutputStream(f);

workbook.save(fos, FileFormatType.EXCEL2007);


After an initial test, I can find the issue using your code and template file.

We will figure it out soon.

I have logged your issue into our issue tracking system with an issue id: 18181.
Thank you.


Please try the attached fix of Aspose.Cells for Java.

We have fixed the issue.

Best Regards

well, that new version now successfully produces a file, but when i try and open it excel states “The file is not in a recognisable format”. if i change it to save as excel 97-2003 then it works fine.

i’ll try and provide another example


We tested the latest fix with “test.xlsx” as provided by you. Attached is the output XLSX file.

Please provide some source template to reproduce the issue.

Thank you


Thanks for providing the template.

We will further investigate the issue and update you soon.

Best Regards

any update on this issue ?

thanks, simon


Please try the attached version. We have
fixed the issue of saving Excel2007 file.

Thank you.

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

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