Excel转Html OLE图片的链接未转义

ExcelOLEEncode.zip (1.6 MB)
引用的图片链接含有公文
URL未进行Encode,导致引用出错

src应进行URLEncode,处理为
oleObject_%E5%AF%BC%E5%9B%BE_1.png

转换代码如下

//Load the sample Excel file

Workbook workbook = new Workbook(sourceFileName);

//Specify Html Save Options

HtmlSaveOptions options = new HtmlSaveOptions();

//We do not want to export document, workbook and worksheet properties

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 );

//Specify HtmlSaveOptions - Hide Overlaid Content with CrossHideRight while saving to Html

options.setHtmlCrossStringType(HtmlCrossType. CROSS_HIDE_RIGHT );

//Export the Excel file to Html with Html Save Options

workbook.save(targetFileName, options);

@wangwenyou,

我已尝试使用最新版本的Aspose.Cells for Java 19.3.6但无法观察到此问题,因为HTML OLE图像链接已正确转义并生成输出HTML文件,类似于使用Excel 365创建的文件。您可以请尝试使用最新版本并提供反馈。

Aspose.Cells for Java 19.3.6

已使用最新版本19.4验证,问题仍然存在,请注意查看生成的html的源文件
src=“excel_xlsx_files/oleObject_导图_1.png”
正确的应该生成
src=“excel_xlsx_files/oleObject_%E5%AF%BC%E5%9B%BE_1.png”

@wangwenyou,
我担心我无法理解这个问题。我尝试使用Excel365进行相同的HTML转换,但无法观察到Aspose.Cells和Excel365创建的输出之间的差异。这两个文件在浏览器中都有类似的显示。你能否详细解释这个问题以及由Excel创建的HTML作为Aspose.Cells模仿Excel的行为?