Getting the Invalid tag "Title" in the SpreadsheetML file Exception while using Aspose Cells

Hi Aspose Team,

We are using Aspose cells to create a workbook for an Excel file (XLS Extension). But we are getting this exception:

com.aspose.cells.CellsException: Line 0: Invalid tag “Title” in the SpreadsheetML file.
at com.aspose.cells.zbmp.a(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.zbmp.a(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.zbmp.j(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.zbmp.a(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.zbmp.a(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.zka.a(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.Workbook.a(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]
at com.aspose.cells.Workbook.(Unknown Source) ~[aspose-cells-21.4.jar:21.4.0]

Please let us know what can be done to resolve this.

Thanks

@hruser
By testing on the latest version v25.2 using the following sample code, we were able to run the program normally without any exceptions. Please refer to the attachment. out_java.zip (1.2 KB)

Workbook wb = new Workbook();
Cells cells = wb.getWorksheets().get(0).getCells();
cells.get("A1").putValue("test");
wb.save(filePath + "out_java.xls"); 

Would you like to provide your sample file and runnable test code? We will check it soon.

@John.He
Sure, Here is the Sample Excel File and we are using this method to create the workbook:

private Workbook loadOptionsForWorkBook(String filePath) throws Exception {
	LoadOptions loadOptions =new LoadOptions();
	loadOptions.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);
	Workbook workbook = new Workbook(filePath,loadOptions);
	return workbook;
}

Sample_Excel.zip (990 Bytes)

Thanks.

@hruser,

I tested with your template file and sample code using latest version/fix: Aspose.Cells for Java 25.2 and it works fine and I do not get any exception. Also, your so called XLS file is actually SpreadsheetML (.xml) file and may be that’s why you are getting this exception in older versions. Anyways, please try using latest version which has more enhancements/fixes and let us know your feedback.