ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: derbySoft on February 24, 2017, 08:37:39 am

Title: Export excel/csv not working under Safari 9
Post by: derbySoft on February 24, 2017, 08:37:39 am
Hi,

We are facing another issue, that is when exporting file to excel or csv under Safari 9+ only a blank page opens and nothing else.
I think this is a known bug in the current version? Is there any workaround to fix that? Thanks.
Title: Re: Export excel/csv not working under Safari 9
Post by: paramvir on February 24, 2017, 12:31:18 pm
Export examples work fine with Safari on Windows. https://paramquery.com/pro/demos/export

1. Do you face this issue only on Mac OSx?

2. Do you face this issue only with Safari or with other browsers too?

3. Do you face this issue with local export? https://paramquery.com/pro/demos/export_local
Title: Re: Export excel/csv not working under Safari 9
Post by: derbySoft on February 24, 2017, 01:18:38 pm
yes, we are facing this issue only on Mac OSx.
Only with Safari, other browsers work well.
And yes, we are using the local export.

Thanks.
Title: Re: Export excel/csv not working under Safari 9
Post by: paramvir on February 24, 2017, 09:53:36 pm
Local export is dependent upon FileSaver and there are few issues with Safari. https://github.com/eligrey/FileSaver.js

Please use the remote export method if you need to support Safari on MacOS. https://paramquery.com/pro/demos/export
Title: Re: Export excel/csv not working under Safari 9
Post by: derbySoft on February 27, 2017, 03:35:29 pm
Thanks for the answer. We tried remote export on the demo it works fine.
However when we use that in our project, we had a cross region problem:

'XMLHttpRequest cannot load https://paramquery.com/pro/demos/exportData. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://10.200.157.47:8080' is therefore not allowed access.'

Does that mean we have to provide a http service in our backend server to save the file and send back to the frontend?
If so, what should we implement in the backend?

Title: Re: Export excel/csv not working under Safari 9
Post by: paramvir on February 27, 2017, 10:40:17 pm
You would need to implement your own script on backend server to handle export of data.

Steps are mentioned in the API: https://paramquery.com/pro/api#method-exportData

and script examples are provided in Java, ASP.NET, PHP tabs in the example: https://paramquery.com/pro/demos/export