1. #1
    Sencha Premium Member neenhouse's Avatar
    Join Date
    Dec 2007
    Location
    Austin
    Posts
    168
    Vote Rating
    1
    neenhouse is on a distinguished road

      0  

    Default export excel

    export excel


    Hi,

    Does anyone have a good example of how to easily create excel spreadsheets?

    I have the server side code that is going to return my XML + headers...
    I have my hidden iframe at the bottom of the page...

    I need to build a dynamic form and submit it (non ajax) inside my hidden iframe right? How do I do that?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Try searching - there are number of threads regarding this.

  3. #3
    Sencha Premium Member neenhouse's Avatar
    Join Date
    Dec 2007
    Location
    Austin
    Posts
    168
    Vote Rating
    1
    neenhouse is on a distinguished road

      0  

    Default Well

    Well


    I have searched, the terms I used were (excel export, 24 results) and after reading all of the threads I still do not have a good idea of how to build the form. I just need a push in the right direction.
    I love ext.

  4. #4
    Sencha Premium Member neenhouse's Avatar
    Join Date
    Dec 2007
    Location
    Austin
    Posts
    168
    Vote Rating
    1
    neenhouse is on a distinguished road

      0  

    Default found something good

    found something good


    I found this little tidbit:


    Code:
    <div id="form" class="x-layout-inactive-content">
    <form action="../getCustList.do?exportexcel=true" method="POST" name="groupForm">
    <input type="hidden" name="fieldList"/>
    </form>
    </div>
    
    
    
    pagingCust.add('-', {
    text: 'export,
    tooltip: 'export Excel',
    cls: 'x-btn-text-icon excel',
    handler:function()
    {
    document.groupForm.fieldList.value = fieldList;
    document.groupForm.submit();
    /*
    var conn = new Ext.data.Connection();
    conn.request({
    method: 'POST',
    url: '../getCustList.do?exportexcel=true&fieldList=' + fieldList
    //params: { exportexcel: 'true', "fieldList": fieldList}
    });
    */
    }
    });

    that should do the trick It hink
    I love ext.

  5. #5
    Sencha Premium Member neenhouse's Avatar
    Join Date
    Dec 2007
    Location
    Austin
    Posts
    168
    Vote Rating
    1
    neenhouse is on a distinguished road

      0  

    Default OK- downloading excel sheets now... but

    OK- downloading excel sheets now... but


    I am getting excel sheets now, but my post data isn't making it to my server.

    My JS:

    Code:
    var eForm = Ext.get('exportExcel').dom;
                            eForm.view.value = 'myDBview';
                            eForm.val.value = rowSelection; <-- random values
                            eForm.submit();
    and my index.html
    Code:
    <form id="exportExcel" action="php/operations.php" method="POST" name="exportExcel">
    <input type="hidden" id="view" name="view" value="">
    <input type="hidden" id="op" name="op" value="export">
    <input type="hidden" id="val" name="val" value="">
    </form>
    Can anyone see why this would not send POST values through to my server??
    I love ext.

Thread Participants: 1