1. #81
    Sencha User
    Join Date
    Jun 2008
    Posts
    157
    Vote Rating
    0
    wiznia is on a distinguished road

      0  

    Default


    I'm glad you got it working, but I think you are using an outdated version. I moved away from data-uris and used a flash component for the export because of 3 problems:
    - IE doesn't support data uris.
    - You cant specify the name of the file and the extension you get is a .part
    - There's a limit on the ammount of data you can post in a data-uri, so when big data was exported, the browser plainly crashed.

    So I incorporated downloadify (included) which uses the swfobject2 library (http://lmgtfy.com/?q=swfobject2) and is a flash solution.

  2. #82
    Sencha User
    Join Date
    Jul 2011
    Posts
    8
    Vote Rating
    0
    parkcity is on a distinguished road

      0  

    Default Alternative to my previous exportTest.zip

    Alternative to my previous exportTest.zip


    I have updated the package to exportTest2.zip . This package works well. It uses extJS from CDN.
    Deploy it in your server and invoke using the app using the following:


    http://host:port/exportTest2/index.html
    Attached Files

  3. #83
    Sencha User
    Join Date
    Sep 2011
    Posts
    9
    Vote Rating
    0
    supermarcos is on a distinguished road

      0  

    Question Download xls

    Download xls


    Hi, parkcity

    Your work is excellent !!
    But I have a little issue... How can I do to save/download the export result like a file?
    When I put the "exporterbutton" in my toolbar it appears, but it does not do nothing when I click it (and does not say nothing in the javascript console... no error, at least...), then I put a button with this code:

    var gridPanel= Ext.ComponentQuery.query('actividadeslist')[0]; //button.up('gridpanel');
    var dataURL='data:application/vnd.ms-excel;base64,'+Ext.ux.exporter.Exporter.exportGrid(gridPanel);
    window.location.href=dataURL;

    But, when it redirect to the new url instead download, the browser (chrome, in my case) try to load it into and show a very awfull string...

    Can you help me, please?

    Thanks!

  4. #84
    Sencha User
    Join Date
    Jul 2011
    Posts
    8
    Vote Rating
    0
    parkcity is on a distinguished road

      0  

    Default


    supermarcos > Have you defined the header field for your Grid Columns. If not the export button will not work. Also If any of your column is of type date, then you need to have a renderer.

    An example of grid column with header and date renderer field is:

    columns: [
    {
    header: 'Anchor Time',
    text: 'Anchor Time',
    width: 100,
    dataIndex: 'ANCHOR_DTIME',
    renderer: Ext.util.Format.dateRenderer('Y-m-d H:i')

    }
    ]

  5. #85
    Sencha User
    Join Date
    Sep 2011
    Posts
    9
    Vote Rating
    0
    supermarcos is on a distinguished road

      0  

    Question Question

    Question


    Hi, parkcity!

    Thank you for your help. Ok, yes, I have defined the columns in the grid, the problem was the config 'store'... I have defined it in the exporterbutton definition and it is not necesary... without it all works well, but, I have a little problem:
    I need to make my own style in the button, so, I need to use a standard button and then call (when the user does click) the print method... but I don't know how can I do that...
    What is the method in the exporter.js that I must call in the click event of the my button??
    Can you help me, please?
    I try to call the printAny / printStore / printGrid method of the exporter.js file, but it does not work (but does not throw any exception...).
    I use this code (I supousse that only that must not be enough):

    {
    xtype : 'button',
    text : 'Exportar XLS',
    action : 'exportarExcel',
    iconCls : 'icon-tb-imprimir',
    handler : function(){
    debugger;
    click : Ext.ux.exporter.Exporter.exportAny(myGrid, 'excel',{
    swfPath: 'app/lib/components/gridexporter/ux/exporter/downloadify.swf',
    downloadImage: 'app/lib/components/gridexporter/ux/exporter/download.png',
    width: 62,
    height: 22,
    downloadName: "miDownload"
    });
    }
    }

    Can you help me, please?
    Thank you so much!

  6. #86
    Touch Premium Member
    Join Date
    Mar 2011
    Location
    New Jersey, USA
    Posts
    130
    Vote Rating
    0
    jjerome is on a distinguished road

      0  

    Default


    Adding the formatter: 'csv' definitely got me further but... I am running into 2 other problems now:

    1) We are using multiline column headings and csvformater.js "format:" config.columns is only picking up 3 of our 7 columns. store.model.prototype.fields.items does reference all 7 of the columns. Our columns are like this:
    Facility ....Admission .....Discharges
    ...........Daily MTD YTD ..Daily MTD YTD
    abc fac .....5 ...10 100 ....4 ...8 ..95
    (ignore the ... I just put them to aide in spacing)
    As you can see there are actually 7 columns but Config.columns is only picking up the "Facility, Admissions, Discharges".

    I changed the code to use store.model.prototype.fields.items to get the column cound but now I am not getting the headings I want. I am getting the fields name instead.

    2) csvformater.js "geCell:" attempts to call the column renderer. Our renderer function blows up because we are expecting more parameters then your col.renderer(record.get(name), null, record). I added some additional parms to your call to pass which column we are working with.

    Note: csv formatter should have the separator set to "," in my opinion instead of ";"
    Last edited by jjerome; 17 Oct 2011 at 1:32 PM. Reason: Inserted periods to aide spacing of column layout

  7. #87
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Vote Rating
    0
    mmuzamil is on a distinguished road

      0  

    Question Export data of all pages

    Export data of all pages


    Wiznia,

    First of all great work, I really liked your work. It has made export from Grid to excel very easy. But I have few questions regarding this plug-in. I'll appreciate if you can respond to them.

    1. I have a grid with paging toolbar, and I want to export data of all pages to Excel/CSV. Can I do that using this plug-in?

    2. Is it possible to export data of a column in a different format as compared to what is used on UI e.g in a column, I am displaying product code with a hyperlink but In my exported file the hyperlink may not make sense. So can i export data of that column in plain text?

    3. I used this plug-in on a grid which had first column of type '
    actioncolumn', which had icons for edit and delete. When I exported data from this grid in Excel format, it generated the column headers appropriately in the excel file but instead of leaving first column blank (or copying HTML for delete/edit icons), it copied text of 2nd column in this. Actually all data of my grid got shifted on the left i.e. data of 3rd column was copied to 2nd, 4th to 3rd and so on. Is it a know issue or am I doing something wrong?

    Thanks in advance

  8. #88
    Touch Premium Member
    Join Date
    Mar 2011
    Location
    New Jersey, USA
    Posts
    130
    Vote Rating
    0
    jjerome is on a distinguished road

      0  

    Default


    To resolve my first problem above I changed the exportGrid function in exporter.js. If a column has a groupheader I now pick up the multiple headings (and combine them) and also pick up the sub column data. I had to remove the array filter code you were using and to it a bit more manually. (note: since both CSV and EXCEL type use this function it fixes it for both.

    exportGrid: function(grid, formatter, config) {
    config = config || {};
    //var columns = Ext.Array.filter(grid.columns, function(col) {
    var columns = new Array();
    var colcnt = -1;
    var colidx = -1;
    for (var i = 0; i< grid.columns.length; i++) {
    if(grid.columns[i].isGroupHeader) {
    if (!(grid.columns[i].hidden)) {
    Ext.each(grid.columns[i].items.items, function(col2) {
    colcnt++;
    colidx++;
    columns[colcnt] = col2;
    var chkpos = col2.text.trim().indexOf(grid.columns[i].text.trim());
    if (chkpos === -1) {
    columns[colcnt].text = grid.columns[i].text + ' ' + col2.text;
    }
    columns[colcnt].colIndex = colidx;
    //alert('sub col text: ' + columns[colcnt].text);
    });
    } else {
    colidx++;
    }
    } else {
    if (!(grid.columns[i].hidden)) {
    colcnt++;
    colidx++;
    columns[colcnt] = grid.columns[i];
    columns[colcnt].colIndex = colidx;
    //alert('main col text: ' + columns[colcnt].text);
    } else {
    colidx++;

  9. #89
    Sencha User
    Join Date
    Sep 2010
    Posts
    4
    Vote Rating
    0
    ssuarez is on a distinguished road

      0  

    Default Downloadify is not defined

    Downloadify is not defined


    Any idea what is causing this? I, admittedly, am a complete novice...

    This is the error in firebug:

    Downloadify is not defined
    Downloadify.create(this.el.down('p').id,{

  10. #90
    Touch Premium Member
    Join Date
    Mar 2011
    Location
    New Jersey, USA
    Posts
    130
    Vote Rating
    0
    jjerome is on a distinguished road

      0  

    Default


    Do you have downloadify.min.js and downloadify.swf somewhere where the app can find them.

Thread Participants: 117

  1. dawesi (1 Post)
  2. feiji1983 (1 Post)
  3. isaac (1 Post)
  4. radtad (4 Posts)
  5. austin1030 (1 Post)
  6. pavanextjs (5 Posts)
  7. aragm (1 Post)
  8. terjeio (1 Post)
  9. il Sergio (2 Posts)
  10. edspencer (1 Post)
  11. nitingautam (2 Posts)
  12. edykstra (3 Posts)
  13. kalchas (4 Posts)
  14. pardha (1 Post)
  15. shelly (1 Post)
  16. talha06 (3 Posts)
  17. vaucer (1 Post)
  18. SMMJ_Dev (7 Posts)
  19. Ekambos (1 Post)
  20. vispiron (1 Post)
  21. sdruckerfig (4 Posts)
  22. jwcraig (1 Post)
  23. dbrin (1 Post)
  24. scaddenp (2 Posts)
  25. grisevich (1 Post)
  26. semialcruz (3 Posts)
  27. krishnarn1 (1 Post)
  28. mikih (1 Post)
  29. Teemac (3 Posts)
  30. jpcoppol (1 Post)
  31. ssuarez (4 Posts)
  32. trinitrotoluen (1 Post)
  33. aladdina (1 Post)
  34. Mental (3 Posts)
  35. nuskin (5 Posts)
  36. droessner (5 Posts)
  37. HIG (1 Post)
  38. jjerome (4 Posts)
  39. bee (2 Posts)
  40. RAD001 (8 Posts)
  41. RNL (1 Post)
  42. shawon (4 Posts)
  43. parkcity (4 Posts)
  44. carlosgoias (1 Post)
  45. Ewoq (7 Posts)
  46. skotamreddy (1 Post)
  47. another_i (5 Posts)
  48. neerajbherwal (1 Post)
  49. nimda13 (2 Posts)
  50. acteon (2 Posts)
  51. ma1986 (2 Posts)
  52. pierrocknroll (1 Post)
  53. Aranair (7 Posts)
  54. clarkbanks (1 Post)
  55. linyajun (1 Post)
  56. delusion (2 Posts)
  57. Jay Tanwar (2 Posts)
  58. supermarcos (6 Posts)
  59. mmuzamil (1 Post)
  60. amishra06 (1 Post)
  61. hundare (1 Post)
  62. Ecthelion (1 Post)
  63. balajivaikar (2 Posts)
  64. jarobi (1 Post)
  65. ferchotipin (2 Posts)
  66. sebas2515 (3 Posts)
  67. arpeggian (3 Posts)
  68. a_kanin (1 Post)
  69. MeDigital (1 Post)
  70. Vasanthoo7 (3 Posts)
  71. jeora (1 Post)
  72. BlackLine (1 Post)
  73. mrhomer (7 Posts)
  74. KostasP (2 Posts)
  75. rdominelli (4 Posts)
  76. pksiv (1 Post)
  77. yoisen (2 Posts)
  78. opms (1 Post)
  79. Oxii (1 Post)
  80. sarz (6 Posts)
  81. gabsoftware (3 Posts)
  82. 9josh (1 Post)
  83. ananthk (2 Posts)
  84. psnprasad (1 Post)
  85. alex9311 (2 Posts)
  86. Pedro2263 (1 Post)
  87. felix822 (2 Posts)
  88. mpasacrita@escholar.com (1 Post)
  89. Garry Hawkins (1 Post)
  90. jesus.balles (1 Post)
  91. chandrima31 (1 Post)
  92. this-is-sparta (1 Post)
  93. vitalz (7 Posts)
  94. Sheng_Yunzhou (2 Posts)
  95. xdengli (1 Post)
  96. sgscontact (1 Post)
  97. nitingogia@gmail.com (1 Post)
  98. Swetosuvro (1 Post)
  99. sudrak (1 Post)
  100. cdmein (1 Post)
  101. code4jhon (1 Post)
  102. felixfang (2 Posts)
  103. jayasingh1802 (2 Posts)
  104. abdul haq (3 Posts)
  105. luatbravo (1 Post)
  106. gilmaredo@gmail.com (1 Post)
  107. ricardo.lourival (1 Post)
  108. Sundarganesh Ramar (1 Post)
  109. madhavan281981 (1 Post)
  110. suvo (3 Posts)
  111. shankar8rajah1 (1 Post)
  112. benny_GI (1 Post)
  113. cojocarutudor (1 Post)
  114. arnoldvillasanta (4 Posts)
  115. tajashwin (1 Post)
  116. mangeshppatil (2 Posts)
  117. mukhriddin (1 Post)