Issue
Their is new error now i want to download this from calling to url. Means in this code i have to upload it on live but their is no option in live that give the static path of our computer. So, now how i can save the file calling for the url.
import asposecells
import urllib.request
jpype.startJVM("-Xmx10g")
from asposecells.api import Workbook
workbook = Workbook("http://localhost/cafe_ci/assets/TestFile.xlsx")
workbook.save("http://localhost/cafe_ci/assets/TestFile2.xlsb")
jpype.shutdownJVM()```
ERROR👇
Exception Traceback (most recent call last)
~\anaconda3\lib\site-packages\_jpype.cp39-win_amd64.pyd in com.aspose.cells.Workbook.<init>()
Exception: Java Exception The above exception was the direct cause of the following exception:
java.io.FileNotFoundException Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_7624\3627910572.py in <module>
4 jpype.startJVM("-Xmx10g")
5 from asposecells.api import Workbook
----> 6 workbook = Workbook("http://localhost/cafe_ci/assets/TestFile.xlsx")
7 workbook.save("http://localhost/cafe_ci/assets/TestFile2.xlsb")
8 jpype.shutdownJVM()
java.io.FileNotFoundException: java.io.FileNotFoundException: Can't find file: http://localhost/cafe_ci/assets/TestFile.xlsx.
[1]: https://i.stack.imgur.com/t76pv.png
Solution
You can try this to increase your memory to 2gb
jpype.startJVM("-Xms2g")
Answered By - sainivetha
Answer Checked By - David Goodson (JavaFixing Volunteer)