test.zip (21.4 KB)
excel里的图片,转换以后不透明,遮挡了文字。使用excel另存为html,图片是透明的。
转换代码:
//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);