Java / "File is corrupted" on a valid document

Hi,
I’ve got the following code:

import com.aspose.cells.*
import java.io.File
import java.io.FileInputStream
val loadOptions = LoadOptions(LoadFormat.XLSX)
val workbook = Workbook(FileInputStream(File("/Users/mdeaconu/Downloads/4sheets-10m.xlsx")), loadOptions)

that runs on an Excel spreadsheet generated with Aspose as well. I’ve open it up in Excel and other editors and the file is not corrupted.

Blockquote
Exception in thread “main” com.aspose.cells.CellsException: File is corrupted
at com.aspose.cells.v7d.warning(Unknown Source)
at com.aspose.cells.h4.a(Unknown Source)
at com.aspose.cells.c3p.a(Unknown Source)
at com.aspose.cells.l__.a(Unknown Source)
at com.aspose.cells.l__.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)

Document is available for download here: 4sheets-10m-x copy 9 (4) (2) (1).xlsx - Google Sheets

Initial investigation on our side hints on this being related to freeze panes.

@mdeaconu,

Please try using our latest version/fix: Aspose.Cells for Java v22.11. I have tested with it using your template file (after downloading it in XLSX file format), it works fine and I do not find any exception.

I’ve used v22.10 and it fixes the issue. 22.11 is not available in Aspose Repository Browser /java/repo/com/aspose/aspose-cells/. Thank you!

@mdeaconu,

It is there, please use the repository:
https://releases.aspose.com/java/repo/com/aspose/aspose-cells/