jQWidgets Forums

jQuery UI Widgets Forums DataTable DataTable Export to local variable

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 10 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • DataTable Export to local variable #63142

    kc2112
    Participant

    Good day! I’m working with a jqxDataTable and am trying to export my data to a local variable, similar to what I can do with the jqxGrid. The idea is to not send data to an external URL in order to export my data and not develop my own save-file.php document.

    With the jqxGrid, I am able to do so with the following:

    var exportInfo = $(“#jqxgrid”).jqxGrid(‘exportdata’, ‘xls’, null, true);
    var data = new Blob([exportInfo], {type: ‘text/plain’});
    var link = document.getElementById(
    ‘downloadlink’);
    var f = window.URL.createObjectURL(
    data);
    link.href = f;

    Thanks,
    Kurt

    DataTable Export to local variable #63161

    Peter Stoev
    Keymaster

    Hi Kurt,

    For customization of the DataTable’s export settings, look at the exportSettings property.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    DataTable Export to local variable #65640

    Vivek
    Participant

    Hi Peter,

    I saw the exportSettings property and I understood that we can specify the server URL which can be hit and data can be prepared locally. But I am confused about where to keep the save-file.php file and how to modify it. Can you please give me any leads on that. It will be really helpful.

    DataTable Export to local variable #65644

    Peter Stoev
    Keymaster

    Hi Vivek,

    If you have save-file.php, you can upload it where you wish on your server. When you set the exportSettings of jqxDataTable, make sure to point the correct URL. That’s all.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.