Cannot Save Files to Browser #1299
-
Hello, Unfortunately, I am unable to share the code itself as it is all considered closed-source, proprietary, and company property. However, I can describe what it is I'm doing: The Javascript simply takes an array of arrays, creates an Excel sheet out of them, and then tries to write the workbook to a new Excel file (.xlsx, specifically). The scripts I am consuming (in order) are the full sheetjs browser script, and then my full script. It seems all of the functions on the Javascript end are working, apart from writing to a file. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Jint doesn't know how to write files, on purpose. You need to teach it how to do it. For instance by implement the code your script is calling do create these ... and do it in a safe way such that malicious scripts can't harm your system (isolated folder with limits). |
Beta Was this translation helpful? Give feedback.
-
Could you elaborate more on what you mean by 'teach it'? |
Beta Was this translation helpful? Give feedback.
-
SheetJS calls into the browser API. This is the part you need to add to the Engine, in .NET. So if SheetJS calls an API named |
Beta Was this translation helpful? Give feedback.
SheetJS calls into the browser API. This is the part you need to add to the Engine, in .NET. So if SheetJS calls an API named
file.save()
you need to create a propertyfile
that has asave()
method that will call into your .NET code.