html-xlsx file not opening
-
Hi Jan
Thanks for the response.
I get a similar message when downloading the file. The downloaded file seems to be a valid xlsx file but won't open.
I will try something with the docx recipe and let you know.
-
Don't you have some global script that could modify the response?
https://jsreport.net/learn/scripts#global-scriptsOr a custom extension?
-
Hi Jan
No, my template is as below:
<table>
<tr>
<td>
Test
</td>
</tr>
</table>The only thing I modify is the recipe and then attempt to preview or download and I get the error.
I tried the docx recipe using the invoice example and it renders fine on my development instance.
-
Hm,
could you compress your whole application folder, upload it somewhere and share a link?
-
OK, I have managed to resolve the issue by downloading the latest version of JSReport 3.1.1 and testing the same html-to-xlsx template in a new project.For some reason, it now works in my original project now. Not sure what the issue could have been, but I am relieved that it works now.This didn't turn out to work after restarting the project.
@jan_blaha , I have mailed you a link to the application folder.
-
Ups, now I remember...
The html-to-xlsx recipe in jsreport v2, doesn't work with node.js 16.
You need to either downgrade to node 14, or use jsreport v3.
-
Ah thanks Jan, that makes sense now.
I will downgrade for now and hopefully that will resolve it.
-
@jan_blaha could you solve the problem with node v16 or is necesary to use in v14?
-
I am afraid you need to use node 14 with jsreport v2 in order to have excel working.
The jsreport v3 should ve used with the latest LTS.
-
Excel cannot open the file ****.xlsx because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.