Aspose Cells Java - HTML export questions

Hi
I am using Aspose Cells Java 8.3.1 and trying to export a Workbook to HTML
It works quite fine but :
  1. A strange message get generated at the top: "To display a data sheet, please click on the small arrow located left of this text" (also there is no arrow displayed on the left)
    How do we get rid of this message?
  2. If we use workbook.save("C:/myApplication/web/temp/workbook.html");
    then the images path will be relative; ex: src="workbook_files\chart_Data_1.png"
    So, if the user was currently navigating at /myApplication/anotherPath/, the images won't get displayed (because it will look for /myApplication/anotherPath/workbook_files/chart_Data_1.png)
    How can we set the URL prefix for the images?
  3. I tried using:
    saveOptions.setAttachedFilesDirectory("C:/myApplication/web/temp");
    saveOptions.setAttachedFilesUrlPrefix("/myApplication/temp/");
    workbook.save(outputStream, saveOptions);
    But then it generated a strange "C:/myApplication/web/temp/null" subdirectory... breaking the image link too
Thanks,
Jean.

Hi Jean,

Thanks for your posting and using Aspose.Cells.

Please go through this thread. It will be helpful for you resolving your issues with HTML export.

( )

Hi,

I have looked at this thread and downloaded the latest 8.4.1 release but I still do not understand why we do have this null subdirectory generated?
Regards,
Jean.

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue with the latest version Aspose.Cells
for Java v8.4.1.5
and with the older version (8.3.2). We found the latest version is not working correctly and the older version is generating the files but it is creating a null subdirectory.

I have tested this issue with the following sample code with the attached source excel file. I have also attached the created html related files for a reference.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41332 - AttachedFilesDirectory and AttachedFilesUrlPrefix are not working properly

Java

String path = “F:\Shak-Data-RW\Downloads\”;


String inPath = path + “source.xlsx”;

String outPath = path + “myOut.htm”;


Workbook workbook = new Workbook(inPath);


HtmlSaveOptions opts = new HtmlSaveOptions();

opts.setAttachedFilesDirectory(path + “att”);

opts.setAttachedFilesUrlPrefix("http//www.example.com/report/");


FileOutputStream fs = new FileOutputStream(outPath);

workbook.save(fs, opts);

fs.close();

The issues you have found earlier (filed as CELLSJAVA-41332) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.