aspose-free-consulting / projects

The starting point for Aspose free consulting projects
5 stars 5 forks source link

How to modify the name of the folder to which additional files will be exported when using Aspose.Cells to convert Excel to HTML in Java. #388

Open YiFengGu1999 opened 2 months ago

YiFengGu1999 commented 2 months ago

I used the HtmlSaveOptions.setAttachedFilesDirectory() provided by you to set the folder name that I need to modify, but it seems to have no effect. The generated folder is still named "output_files".

the following are my code

        com.aspose.cells.Workbook workbook = new com.aspose.cells.Workbook(convFile.getPath());

        HtmlSaveOptions options = new HtmlSaveOptions();

        options.setAttachedFilesDirectory("/Users/g/Desktop/newOutputFilesName");

        workbook.save("/Users/g/Desktop/output.html", options);
amjad-sahi commented 2 months ago

@YiFengGu1999,

The HtmlSaveOptions.setAttachedFilesDirectory method is used when saving files to stream. This folder is automatically generated. It is a folder with a saved file name followed by the “_files” string. Currently, Aspose.Cells for Java does not support customizing the name of the output folders when converting Excel to HTML file format. We have created a new feature to support setting default folders when saving file to html. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies. Issue ID(s): CELLSJAVA-45869

Once we have an update on it, we will let you know. You may also keep an eye on your posted thread in the forums for follow up for your reference.

amjad-sahi commented 2 months ago

@YiFengGu1999,

This is to inform you that your issue (logged earlier as "CELLSJAVA-45869") has been resolved. The fix will be included in an upcoming release (Aspose.Cells for Java v24.3) that we plan to release either in this week or in the next week of March 2024.

Please stay tuned!

amjad-sahi commented 2 months ago

@YiFengGu1999,

We have published Aspose.Cells for Java v24.3 now. Please try it.