jQWidgets Forums

jQuery UI Widgets Forums Grid Export Csv without internet connection

This topic contains 6 replies, has 2 voices, and was last updated by  dexteraniz 11 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author

  • dexteraniz
    Participant

    Hi,

    Is it possible to export csv report locally that does not requires internet connection to connect to http://www.jqwidgets.com.

    Thanks,
    Regards,


    Peter Stoev
    Keymaster

    Hi dexteraniz,

    If you don’t pass the file name parameter, the export would be local and the result could be saved in your variable.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    dexteraniz
    Participant

    Thanks Peter.

    I copy the save-file.php but an error appears on my browser says that,
    “The HTTP verb POST used to access path ‘/jqwidgets/save-file.php’ is not allowed.”

    this is my code in exporting CSV
    function exportCSV(product, feature) {
    var usageGrid = $j(‘#’ + toSafeName(product + ‘_-‘ + feature));
    usageGrid.jqxGrid(‘exportdata’, ‘csv’, usageGrid.attr(‘id’), true, null, true, ‘/jqwidgets/save-file.php’);
    }

    need help.
    thanks,
    Regards.


    Peter Stoev
    Keymaster

    Hi dexteraniz,

    save-file.php requires internet connection. I meant to do not pass file name so the export would be in variable.

    Best Regards,
    Peter Stoev

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


    dexteraniz
    Participant

    Hi peter,

    I save it in a variable and since im trying to export csv without internet i use jquery DATA URI to download the csv file. but it only works in FF and chrome. Did jqwidgets have this same code functionality that is compatible with IE, FF and chrome? or related codes that download the csv file without internet connection.

    This is my sample code of jquery Data URI to download csv file without internet connection.

    function exportCSV(product, feature) {
    var usageGrid = $j(‘#’ + toSafeName(product + ‘_-‘ + feature));
    var exportFile = usageGrid.jqxGrid(‘exportdata’, ‘csv’);
    exportCSVReport.apply(exportFile, [exportFile, usageGrid.attr(‘id’) + ‘.csv’]);
    }

    function exportCSVReport(csv, filename) {
    var csvData = ‘data:application/csv;charset=utf-8,’ + encodeURIComponent(csv);
    $j(‘.feature-report-csv’).attr({
    ‘download’: filename,
    ‘href’: csvData,
    ‘target’: ‘_blank’
    });

    }

    Thanks!,
    Best Regards.


    Peter Stoev
    Keymaster

    Hi dexteraniz,

    No, we do not have a solution which allows you to Download a file without Internet Connection.

    Best Regards,
    Peter Stoev

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


    dexteraniz
    Participant

    Thanks peter.

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

You must be logged in to reply to this topic.