How to post Spreadsheet data to php script

2 posts, 0 answers
  1. Reinier
    Reinier avatar
    2 posts
    Member since:
    Oct 2016

    Posted 04 Nov 2016 Link to this post


    I have build a nice spreadsheet with the UI for PHP.

    The PHP script retrieves data from a MySQL database and populates the spreadsheet.

    Now, I try to POST the spreadsheet data to another PHP script that will update the MySQL database tables.

    Unfortunately I do not manage to post the spreadsheet data to the PHP script. It keeps posting an empty array.

    If I use the demo version "Spreadsheet / Server Import/Export" - HTML5/JavaScript source ( and just set the "<form action='' to my PHP script, it works as a charm. But it does not post the data from the spreadsheet I created with PHP.

    Does anybody knows what to do to get this working?


    I have attached the php script.

  2. Reinier
    Reinier avatar
    2 posts
    Member since:
    Oct 2016

    Posted 06 Nov 2016 in reply to Reinier Link to this post

    I have changed this code in the widget.php:

    1) added this property:

    public additional_jquery_code

    2) and at the bottom of the script:

    if ($executeOnDomReady) {
        // added Reinier 20161006 to add code to activate Data save to php script
        $script[] = $this->additional_jquery_code;

        //end of added line

        $script[] = '});';



    Then, in the php script that builds and renders the html page:



    require_once 'lib/Kendo/Autoload.php';


    // Create a new instance of Spreadsheet and specify its id

    $spreadsheet = new \Kendo\UI\Spreadsheet('spreadsheet');
    $spreadsheet->attr('style', 'width: 100%;');
    $spreadsheet->additional_jquery_code = 'var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
                $(".download").click(function () {

    Now, the spreadsheet data are POSTed to the PHP script that processes the changed data.

Back to Top