Trying to save template with xlsx recipe in MSSQL.
-
The provided excel is really invalid zip file. So far I cannot reproduce it.
Can you try to provide us more information?- does it happen also when using default fs store
- are you able to open the result in excel when you don't reference template, only with
{{{xlsxPrint}}}
in content - can you try it on different pc or possibly os?
- whatever it comes to your mind could be helpful to us
Thank you
-
Tried all that you suggested got the same results, tried this on 2 servers. Did not try another os.
I have discovered this, the xlsx that is created on the server in the appdata folder is valid, the version that is downloaded is corrupt.
I have included the 2 versions in a zip file http://apps.brunsco.net/docs/jsReport2.zip
The server is running Node v6.10.0
-
I have noticed the xlsx on the server in the appdata folder is encoded as ansi and the one downloaded is utf8.
Is this something your application choosing different encoding when saving as opposed to downloading, or is this something i need to check into on my system.
Any ideas?
-
So you confirm that
- the problem is not related to the mssql store, because you have same issue with fs store
- the problem is not related to the particular template
I cannot find an issue in our code. Can you try the download with a different browser? Does this happen also when you download the stream using API call?
I tried again and really cannot reproduce it.The headers I see in F12 tools
response
Access-Control-Allow-Origin:* Connection:keep-alive Content-Disposition:inline; filename="report.xlsx" Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Date:Tue, 23 May 2017 14:49:14 GMT File-Extension:xlsx Set-Cookie:render-complete=true; Path=/ Transfer-Encoding:chunked X-Powered-By:Express X-XSS-Protection:0
request
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding:gzip, deflate, br Accept-Language:en-US,en;q=0.8,cs;q=0.6 Cache-Control:max-age=0 Connection:keep-alive Content-Length:1323 Content-Type:application/x-www-form-urlencoded Cookie:session=EvE6LIvpMarDGMC_VwMbWw.8PTgq_6LF6LDqiOtHKXC5nDqHIQmSsY-UQA-dkPMhvIMTqNYZP7AvYGho3_EGxLWKoe2gclxj6PqN-3F9CfPaw.1492679112924.315360000000.8VwR5XvVoZXwLKAPMXrFjr6DA4QEqRsa-PCQqJMsNHI; render-complete=false Host:localhost:5488 Origin:http://localhost:5488 Referer:http://localhost:5488/studio/templates/r18kyD83ce Upgrade-Insecure-Requests:1 User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
-
I got it running, sort of. I installed on my dev machine which was running node v4.6.0 everthing worked fine.
My server was running v6.10.3 which was giving me the issues, i also tried installing v7.10.0 on my server after uninstalling v6.10.3 and was getting same issue.
I then uninstalled node again and put v4.6.0 on the server, excel downloads correctly.
What versions of Node are supported?
Mike
-
Well all of those. It is working for me with version 6.10.3
-
not sure what problem was, i just upgraded node to 6.10.3 and it is working, i am running, i will try rebuilding my dev machine from ground up and see what happens.
Thank you for all your help and time, much appreciated!
-
You are welcome. It is a strange problem. If you ever figure out what could be a possible cause please post here, I'll try to replicate it.
-
The same is happening on the jsreport playground: https://playground.jsreport.net/studio/workspace/Hy_V2BSh/4 and https://playground.jsreport.net/studio/workspace/rJftqRaQ/527
I'm looking into jsreport as an alternate way of producing excel exports but it doesn't seem to work without going through the office online viewer... which isn't really an option for us.
Any idea what is causing the issue?
-
@jbzcooper What kind of issue do you have actually? There are many things mentioned in this thread.