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

Free Support Forum - aspose.com

Aspose.Cells for Java excel转html excel转换后部分格式变形错误

excel转换后部分格式变形错误.zip (111.3 KB)
代码:
Workbook workbook = new Workbook(sourceFileName);

WorksheetCollection sheetCollection = workbook.getWorksheets();
int sheetCont = sheetCollection.getCount();
for(int i=0;i<sheetCont;i++){
    sheetCollection.get(i).autoFitColumns();
}

HtmlSaveOptions options = new HtmlSaveOptions();

options.setExportDocumentProperties(false);
options.setExportWorkbookProperties(false);
options.setExportWorksheetProperties(false);
options.setExportSimilarBorderStyle(true);
options.setExportImagesAsBase64(false);
options.setExcludeUnusedStyles(true);
options.setExportHiddenWorksheet(false);
options.setWidthScalable(false);
options.setPresentationPreference(true);

options.setHtmlCrossStringType(HtmlCrossType.CROSS_HIDE_RIGHT);
workbook.save(targetFileName, options);

@xiangma,
我们已观察到此问题并将其记录在我们的数据库中以供进一步调查。 一旦有任何更新可供分享,您将在此处收到通知。

此问题记录为:
CELLSJAVA-43578 - Formatting issues while converting Excel to HTML

@xiangma,
这是为了通知您,我们现在已经解决了您的问题。 在执行 QA 并合并其他增强和修复后,我们将很快为您提供固定版本。

@xiangma,
Please try our latest version/fix: Aspose.Cells for Java v21.8.2 (attached)
aspose-cells-21.8.2-java.zip (7.4 MB)

Your issue should be fixed now.
Let us know your feedback.

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