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

Free Support Forum - aspose.com

The text in this xlsx is garbled

After using aspose-cell-21.3-java to convert the attached xls to xlsx, the text in this xlsx is garbled.报表结果.xls.zip (4.8 KB)

image.png (724.5 KB)

The following png shows the difference.

@Shimo,
This file is a corrupt old excel95/5.0 file.
We could not find the corresponding encoding in the file. We will try to fix this problem. We have logged the problem CELLSJAVA-44317.

@Shimo,

We are pleased to inform you that your issue has been resolved. With the upcoming fix/release, we will use environment’s default encoding to build those string values. By our test the encoding for your template file should be “GB2312”. So, if the default encoding of user’s environment is this one, the file should be converted correctly now. If the default encoding is not this one, you may specify it with JVM option -Dfile.encoding=GB2312 to make the conversion give correct results.

The issues you have found earlier (filed as CELLSJAVA-44317) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Hi,the problem is still exist.we use Aspose.Cells for Java 22.2.
our code is :slight_smile:
public static void toXlsx(String input, String output, LoadOptions loadOptions) throws Exception {
Workbook workbook = new Workbook(input, loadOptions);
fixDifferenceInValidations(workbook);
workbook.getSettings().setCompliance(OoxmlCompliance.ECMA_376_2006);
workbook.save(output, SaveFormat.XLSX);
}

@Shimo,

Do you use the same Excel file as you attached in the first post in the thread? If not, kindly do share your template XLS file. Also, as we told you regarding your original file, so please do follow it: