I am trying to convert an Excel File to HTML using Aspose.Cells in Python.
The code snippet is:
import jpype
import asposecells
jpype.startJVM()
from asposecells.api import *
wb = Workbook('x.xlsx')
wb.save("x.html")
And I am getting this error:
File "convert.py", line 9, in <module>
wb.save("x.html", saveFormat.HTML)
jpype._jclass.FileNotFoundException: /x_files/sheet001.htm (No such file or directory)
I used the snippet I found in one of the blogs blog
@dharanikumar7998,
We think it could be the rights issue on your end as it works fine on our end. Please note, when we convert XLSX to HTML via Aspose.Cells for Python API creates some additional files (resource files and other style sheets) in the folder where you are saving the converted HTML. So, you should have sufficient rights to create those files on your end. Moreover, we have also tried your scenario/ case by disabling modify permissions from folder security option and got the same issue: error:jpype._jclass.FileNotFoundException: D:\workbook\workbook_simple_files\sheet001.htm (The system cannot find the path specified)
1 Like
Thank you for the people who trying to`help me!
wb.save("op_dir/x.html")
Don’t know why but saving it inside a directory did the trick for me.
@dharanikumar7998,
Good to know that your issue is sorted out now. In the event of further queries or issue, feel free to write us back. We will be happy to assist you soon.