This is a migrated thread and some comments may be shown as answers.

Export to excel of grid privacy issue

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bal
Top achievements
Rank 1
Bal asked on 11 Jan 2020, 05:46 PM

Hi,

We have used below code to export the data in excel format. When we used below code is this send any data to your server. If yes suggest which code should we used that it will not send any data to your server.
Below is the summary.
1. Added below javascript reference.
    <script src="scripts/shared/kendo.all.min.js"></script>
    <script src="scripts/shared/jszip.min.js"></script>
2. Use below code to create workbook and save the file as excel.
                var sheet = {};
                sheet.columns = columnsForEx;
                var titleForSheet = selectedGrid.gridName + " (" + total + ")";
                sheet.title = titleForSheet;
                sheet.rows = rows;
                Recordsheets.push(sheet);

                //create workbok
                var workbook = new kendo.ooxml.Workbook({

                    sheets: Recordsheets
                });

                //save the excel 
                kendo.saveAs({
                    dataURI: workbook.toDataURL(),                   
                    fileName: "ExportedRecords.xlsx"
                });
When we check the call back URL in the workbook.toDataURL() in console then it gives below URL when we put this url in browser then it download the excel file. So this is why we are asking this question. Is any data go to your server.
data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,UEsDBAoAAAAAAOqDKlAAAAAAAAAAAAAAAAAJAAAAZG9jUHJvcHMvUEsDBAoAAAAIAOqDKlCf0zfRMQEAAGkCAAARAAAAZG9jUHJvcHMvY29yZS54bWylkl1LwzAUhu8F/0PJfZukg01C24HKQHQguKF4F5Kzrdh8kES7/XvTbus23J2XyfucJ+ccUky3qkl+wPna6BLRjKAEtDCy1usSLRez9A4lPnAteWM0lGgHHk2r25tCWCaMg1dnLLhQg0+iSXsmbIk2IViGsRcbUNxnkdAxXBmneIhHt8aWiy++BpwTMsYKApc8cNwJUzsY0UEpxaC0367pBVJgaECBDh7TjOITG8Apf7WgT85IVYedhavoMRzora8HsG3brB31aOyf4o/5y1s/alrrblcCUFVIwYQDHoyrnkFLkyyfCnx22S2w4T7M465XNcj73Rn3NysOg+3rQSaxIbZv/5i8jx4eFzNU5SQnKaEpJQtKGaEsp9lkMv7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xkr1MwMBAADmAQAAFAAAAAAAAAAAAAAAAADMCwAAeGwvc2hhcmVkU3RyaW5ncy54bWxQSwECFAAKAAAACADqgypQ3gerdkUBAAAlBAAAEwAAAAAAAAAAAAAAAAABDQAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLBQYAAAAADgAOAE4DAAB3DgAAAAA=
Waiting for your reply.
Thanks!
Balasaheb

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 15 Jan 2020, 08:07 AM

Hi, Bal,

The kendo.ooxml.toDataUrl() function is available in the source in the ooxml/kendo-ooxml.js. Upon inspection, you will find that this is what it does:

    toDataURL: function() {
        var zip = this.toZIP();
        return zip.generateAsync ? zip.generateAsync(DATA_URL_OPTIONS).then(toDataURI) : toDataURI(zip.generate(DATA_URL_OPTIONS));
    }

Since Excel files are a zipped collection of XML files, the JSZip library is necessary to process the generated workbook which is then turned into a dataURI. The dataURI is inline and and it is not sent anywhere unless you add a proxyURL and set forceProxy to true in which case it will be sent to the proxy server along with the forgeryTokens(if you have any on the page).

You can read more about the dataURIs here:

https://en.wikipedia.org/wiki/Data_URI_scheme#Web_browser_support

For posting to proxy, see the below links:

https://docs.telerik.com/kendo-ui/api/javascript/kendo/methods/saveas

Should you have further questions, feel free to get back to us.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Bal
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or