Hi there
I am using Aspose cells to convert Excel files to HTML files.
The result src of img tags in HTML seems not in right format (Only in Linux environment).
Here is my code for test:
Workbook book = new Workbook(“custom/input/xlsx/WCQX_Pusheen.xls”);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (int i = 0; i < book.getWorksheets().getCount(); i++) {
// only one page for test
if (i != 0) {
book.getWorksheets().get(i).setVisible(false);
}
}
HtmlSaveOptions saveOps = new HtmlSaveOptions();
saveOps.setCreateDirectory(false);
saveOps.setExportActiveWorksheetOnly(false);
saveOps.setParseHtmlTagInCell(true);
saveOps.setEncoding(Encoding.getUTF8());
saveOps.setHiddenRowDisplayType(HtmlHiddenRowDisplayType.REMOVE);
saveOps.setHiddenColDisplayType(HtmlHiddenColDisplayType.REMOVE);
saveOps.setExportImagesAsBase64(false);
saveOps.setExportHiddenWorksheet(false);
saveOps.setStreamProvider(new IStreamProvider() {
@Override
public void initStream(StreamProviderOptions arg0) throws Exception {
arg0.setStream(new ByteArrayOutputStream());
}
@Override
public void closeStream(StreamProviderOptions arg0)
throws Exception {
System.out.println(arg0.getDefaultPath());
}
});
book.save(baos, saveOps);
IOUtils.write(baos.toByteArray(), new FileOutputStream(
“custom/output/xlsx/stream.html”));
There will be a img tag like this:

The attribute src seems like the combination of “/tmp” and "image000.gif"
From System output:
System.out.println(arg0.getDefaultPath());
“image000.gif” showed up.
So, the String of src might be made inappropriately.
Please check the file in attachment, thanks
