Excel函数内容转换格式变形

excel函数内容转换格式变形.zip (77.4 KB)

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,

我们评估了您的问题,但即使我们不自动调整列,也会得到不同的显示。 您能否通过 MS Excel 手动将 Excel 文件保存为 HTML(网页)和 PDF。 将输出的 HTML 和 PDF 文件压缩并附在此处。 我们将进一步调查您的问题。

首页的压缩包里有输出的html文件的

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

此问题记录为:
CELLSJAVA-43579 - Text Alignment issue during Excel to HTML conversion

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

@xiangma,
Please try the latest fix:
aspose-cells-21.8.5-java.zip (7.4 MB)

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