1. #221
    Ext User
    Join Date
    Sep 2009
    Posts
    15
    Vote Rating
    0
    Pekka Karalahti is on a distinguished road

      0  

    Default fld is undefined

    fld is undefined


    Same problem still and i have tried to change everything, store, grid, readers... I am desperate. I have debug the code and it writes first column/header okay into csv file but when code is looping to second header it gives error fld is undefined.

  2. #222
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    España
    Posts
    215
    Vote Rating
    0
    vizcano is on a distinguished road

      0  

    Default Problem with hours

    Problem with hours


    I've got a problem trying to display hours, in da DateTime cell i've replaced t += v.format('Y-m-d'); for t += v.format('G:i'); because what i want to show is the hour and my excel crashes.

    Another problem i'm dealing with is when de DateTime cell doesnt contain any value, the new excel crashes again saying "incorrect value" for those cells.

    Could anyone help me with this problems?

  3. #223
    Ext User
    Join Date
    Jan 2010
    Posts
    3
    Vote Rating
    0
    myth is on a distinguished road

      0  

    Default thanks

    thanks


    thank for the thread i find all info y need to export a excel ( i need to read 2 o 3 times but the infornation is here )

  4. #224
    Ext User Cassio11's Avatar
    Join Date
    Jan 2010
    Posts
    3
    Vote Rating
    0
    Cassio11 is on a distinguished road

      0  

    Default


    First of all, thanks for this great plugin!

    However I ran into some trouble when I try to open the Excel-File.
    It gives me an an error and directs me to the Log-File:

    XML PARSE ERROR: Missing end-tag
    Error occurs at or below this element stack:
    <ss:Workbook>
    <ss:Worksheet>
    <ss:Table>
    <ss:Row>
    <ss:Cell>
    <ssata>


    None of my XML-Validators where able to find syntax errors.
    I really ran into a wall here...


    Edit:
    Yay! Fixed it myself.
    The cause were non-UTF-8 characters in the document, while my page uses iso-8859-1 - so I edited the xml header part in the exporttoexcel.js to ISO-8859-1.

  5. #225
    Ext User
    Join Date
    Mar 2010
    Posts
    3
    Vote Rating
    0
    StagnantIce is on a distinguished road

      0  

    Default


    Work fast in IE6 and IE7

    PHP Code:
        createWorksheet: function(includeHidden) {

    //      Calculate cell data types and extra class names which affect formatting
            
    var cellType = [];
            var 
    cellTypeClass = [];
            var 
    cm this.getColumnModel();
            var 
    totalWidthInPixels 0;
            var 
    colXml '';
            var 
    headerXml '';
            var 
    dataIndexes = [];
            
            for (var 
    0len cm.getColumnCount(); leni++) {
                if (
    includeHidden || !cm.isHidden(i)) {
                    var 
    cm.getColumnWidth(i)
                    
    totalWidthInPixels += w;
                    
    colXml += '<ss:Column ss:AutoFitWidth="1" ss:Width="' '" />';
                    
    headerXml += '<ss:Cell ss:StyleID="headercell">' +
                        
    '<ss:Data ss:Type="String">' cm.getColumnHeader(i) + '</ss:Data>' +
                        
    '<ss:NamedCell ss:Name="Print_Titles" /></ss:Cell>';
                        var 
    di cm.getDataIndex(i);
                        
    dataIndexes.push(di);
                        var 
    fld this.store.recordType.prototype.fields.get(di);
                    switch(
    fld.type) {
                        case 
    "int":
                            
    cellType.push("Number");
                            
    cellTypeClass.push("int");
                            break;
                        case 
    "float":
                            
    cellType.push("Number");
                            
    cellTypeClass.push("float");
                            break;
                        case 
    "bool":
                        case 
    "boolean":
                            
    cellType.push("String");
                            
    cellTypeClass.push("");
                            break;
                        case 
    "date":
                            
    cellType.push("DateTime");
                            
    cellTypeClass.push("date");
                            break;
                        default:
                            
    cellType.push("String");
                            
    cellTypeClass.push("");
                            break;
                    }
                }
            }
            
            var 
    visibleColumnCount cellType.length;

            var 
    result = {
                
    height9000,
                
    widthMath.floor(totalWidthInPixels 30) + 50
            
    };



    //      Generate worksheet header details.
            
    var = [];

            
    A.push('<ss:Worksheet ss:Name="' this.title '">' +
                
    '<ss:Names>' +
                    
    '<ss:NamedRange ss:Name="Print_Titles" ss:RefersTo="=\'' this.title '\'!R1:R2" />' +
                
    '</ss:Names>' +
                
    '<ss:Table x:FullRows="1" x:FullColumns="1"' +
                    
    ' ss:ExpandedColumnCount="' visibleColumnCount +
                    
    '" ss:ExpandedRowCount="' + (this.store.getCount() + 2) + '">' +
                    
    colXml +
                    
    '<ss:Row ss:Height="38">' +
                        
    '<ss:Cell ss:StyleID="title" ss:MergeAcross="' + (visibleColumnCount 1) + '">' +
                          
    '<ss:Data xmlns:html="http://www.w3.org/TR/REC-html40" ss:Type="String">' +
                            
    '<html:B><html:U><html:Font html:Size="15">' this.title +  '</html:Font></html:U></html:B> Generated by ExtJs</ss:Data><ss:NamedCell ss:Name="Print_Titles" />' +
                        
    '</ss:Cell>' +
                    
    '</ss:Row>' +
                    
    '<ss:Row ss:AutoFitHeight="1">' +
                    
    headerXml 
                    
    '</ss:Row>');
            for (var 
    0it this.store.data.itemsit.lengthli++) {
                
    A.push('<ss:Row>');
                var 
    cellClass = (1) ? 'odd' 'even';
                
    it[i].data;
                var 
    0
                for (var 
    0len dataIndexes.lengthlenj++) {
                    var 
    r[dataIndexes[j]];
                    
    A.push('<ss:Cell ss:StyleID="' cellClass cellTypeClass[k] + '"><ss:Data ss:Type="' cellType[k] + '">');
                        if (
    cellType[k] == 'DateTime') {
                            
    A.push(v.format('Y-m-d'));
                        } else {
                            
    A.push(v);
                        }
                    
    A.push('</ss:Data></ss:Cell>');
                    
    k++;
                }
                
    A.push('</ss:Row>');
            }
            
    A.push ('</ss:Table>' +
                
    '<x:WorksheetOptions>' +
                    
    '<x:PageSetup>' +
                        
    '<x:Layout x:CenterHorizontal="1" x:Orientation="Landscape" />' +
                        
    '<x:Footer x:Data="Page &amp;P of &amp;N" x:Margin="0.5" />' +
                        
    '<x:PageMargins x:Top="0.5" x:Right="0.5" x:Left="0.5" x:Bottom="0.8" />' +
                    
    '</x:PageSetup>' +
                    
    '<x:FitToPage />' +
                    
    '<x:Print>' +
                        
    '<x:PrintErrors>Blank</x:PrintErrors>' +
                        
    '<x:FitWidth>1</x:FitWidth>' +
                        
    '<x:FitHeight>32767</x:FitHeight>' +
                        
    '<x:ValidPrinterInfo />' +
                        
    '<x:VerticalResolution>600</x:VerticalResolution>' +
                    
    '</x:Print>' +
                    
    '<x:Selected />' +
                    
    '<x:DoNotDisplayGridlines />' +
                    
    '<x:ProtectObjects>False</x:ProtectObjects>' +
                    
    '<x:ProtectScenarios>False</x:ProtectScenarios>' +
                
    '</x:WorksheetOptions>' +
            
    '</ss:Worksheet>');
            
    result.xml A.join('');
            return 
    result

  6. #226
    Ext User
    Join Date
    Mar 2010
    Posts
    3
    Vote Rating
    0
    StagnantIce is on a distinguished road

      0  

    Default


    In IE send Ajax request with params is a bad case.

    var data = grid.getExcelXml();
    if ((!Ext.isIE7)&&(!Ext.isIE6)) document.location = 'data:application/vnd.ms-excel;base64,' + Base64.encode(data);
    else
    {
    if (!Ext.fly('frmDummy'))
    {
    var frm = document.createElement('form');
    frm.id = 'frmDummy';
    frm.name = id;
    frm.className = 'x-hidden';

    var inp = document.createElement('input');
    inp.type = "hidden";
    inp.value = data;
    inp.id = "data";
    inp.name = "data"
    frm.appendChild(inp);

    document.body.appendChild(frm);
    }
    Ext.Ajax.request({
    url: 'excel.php',
    method : 'POST',
    form: Ext.fly('frmDummy'),
    callback: function(o, s, r){
    },
    isUpload: true
    //params: { data: data }
    });
    }

  7. #227
    Ext User shailendra's Avatar
    Join Date
    Apr 2010
    Posts
    8
    Vote Rating
    0
    shailendra is on a distinguished road

      0  

    Default


    Quote Originally Posted by maggiesnyder View Post
    I'm using FF3 on a Windows machine.

    I'm using this extension and so far it works very well except for two small things.

    1. The filename seems to be a string of random letters.
    2. When I try to save the file, the extension is weird - it shows up as .xls.part, and then when I actually save the file it adds another .xls to it so the filename ends up looking like this:

    XR9oqU0s.xls.part.xls

    The file opens fine, I'm just wondering if this has happened to anyone else?
    Hi!
    I just entered here
    Its happening to me also, any solution you found pls let me know

  8. #228
    Ext User shailendra's Avatar
    Join Date
    Apr 2010
    Posts
    8
    Vote Rating
    0
    shailendra is on a distinguished road

      0  

    Default


    Quote Originally Posted by zhw511006 View Post
    Thank you for sharing your code!

    But Error ! IE7:
    The data area passed to a system call is too small.

    Hi!
    sorry but i m also getting the same error in IE8
    any solution ?
    thanks

  9. #229
    Sencha User calavera's Avatar
    Join Date
    Jan 2008
    Posts
    119
    Vote Rating
    0
    calavera is on a distinguished road

      0  

    Default


    Quote Originally Posted by shailendra View Post
    Hi!
    I just entered here
    Its happening to me also, any solution you found pls let me know
    Me to. I get the weird file name and when I try to open with Microsoft Excel, it gives me an error at "Table". Don't know more of it. Tested on Firefox 3.6.3 . Any solution ? Thanks.

  10. #230
    Sencha User
    Join Date
    Jan 2009
    Posts
    11
    Vote Rating
    0
    Skunkerbr is on a distinguished road

      0  

    Default 3.2.1

    3.2.1


    Hi..

    I noticed that in Ext 3.2.1, the line:
    Code:
    var fld = this.store.recordType.prototype.fields.get(cm.getDataIndex(i));
    ..returns a Object type with another type in it. So now fld.type must be replace with fld.type.type in the switch to handle the field type right.

    Code:
    switch(fld.type.type) {
        case "int":
            cellType.push("Number");
            cellTypeClass.push("int");
            break;
        case "float":
            cellType.push("Number");
            cellTypeClass.push("float");
            break;
        case "bool":
        case "boolean":
            cellType.push("String");
            cellTypeClass.push("");
            break;
        case "date":
            cellType.push("DateTime");
            cellTypeClass.push("date");
            break;
        default:
            cellType.push("String");
            cellTypeClass.push("");
            break;
    }
    Anyone getting the same on 3.2.1 ? Or just me

Thread Participants: 140

  1. alexb (1 Post)
  2. galdaka (3 Posts)
  3. ghyster (1 Post)
  4. Condor (1 Post)
  5. TopKatz (1 Post)
  6. Jul (1 Post)
  7. mystix (3 Posts)
  8. Foggy (2 Posts)
  9. bloon (1 Post)
  10. fshort (1 Post)
  11. antimatter15 (1 Post)
  12. cocinerox (1 Post)
  13. tobiu (1 Post)
  14. ajaxE (2 Posts)
  15. andreyz (1 Post)
  16. devnull (4 Posts)
  17. mjlecomte (4 Posts)
  18. kevinwu8 (1 Post)
  19. rakesh (1 Post)
  20. hendricd (2 Posts)
  21. gelleneu (1 Post)
  22. isaac (1 Post)
  23. huling (1 Post)
  24. ckr (1 Post)
  25. roopa (1 Post)
  26. loveyeah (1 Post)
  27. zhfxu_cs (1 Post)
  28. Mthor (1 Post)
  29. johnlicy (1 Post)
  30. thoreking (2 Posts)
  31. csqjean (1 Post)
  32. mankz (1 Post)
  33. vietschv (1 Post)
  34. verbi (1 Post)
  35. sanjshah (2 Posts)
  36. mask_hot (1 Post)
  37. calavera (1 Post)
  38. vsmike (1 Post)
  39. vizcano (1 Post)
  40. lakehouse (1 Post)
  41. alaska (2 Posts)
  42. radtad (3 Posts)
  43. jmcneese (1 Post)
  44. Rafael (4 Posts)
  45. calvouze (1 Post)
  46. Joyfulbob (1 Post)
  47. angeldimitrov (2 Posts)
  48. Jack_S (2 Posts)
  49. g13013 (2 Posts)
  50. DamienValentine (5 Posts)
  51. Marcelo Delgado (1 Post)
  52. NoahK17 (8 Posts)
  53. anujg (1 Post)
  54. aproust94 (3 Posts)
  55. pokerking400 (1 Post)
  56. Ronhead (1 Post)
  57. krzak (3 Posts)
  58. cvieira (1 Post)
  59. Efex (5 Posts)
  60. gthe (2 Posts)
  61. miihiir (2 Posts)
  62. pops (1 Post)
  63. emredagli (12 Posts)
  64. larsa (2 Posts)
  65. maggiesnyder (3 Posts)
  66. sam.zhang (1 Post)
  67. kristalgic (1 Post)
  68. wiznia (3 Posts)
  69. frpucci (1 Post)
  70. tinakonda (1 Post)
  71. tBSTAR (1 Post)
  72. tdg2008 (1 Post)
  73. iwagon (1 Post)
  74. psarunkumar (1 Post)
  75. kimmking (1 Post)
  76. sKuD24 (1 Post)
  77. MartinL (2 Posts)
  78. BitPoet (2 Posts)
  79. snoir (3 Posts)
  80. naranda (1 Post)
  81. zhw511006 (1 Post)
  82. bobjbain (1 Post)
  83. korto (1 Post)
  84. wp.joju (1 Post)
  85. hastiok (6 Posts)
  86. dtondo (4 Posts)
  87. Dumas (1 Post)
  88. vvreddy@12 (4 Posts)
  89. TheBim (1 Post)
  90. whodat (2 Posts)
  91. Skunkerbr (2 Posts)
  92. stevenhzj (4 Posts)
  93. Naokai (1 Post)
  94. wayned@escc (2 Posts)
  95. MuadDib-DK (1 Post)
  96. jsundquist (1 Post)
  97. hardc0re (2 Posts)
  98. hzwei (4 Posts)
  99. Galileo_Galilei (1 Post)
  100. SantaBarbarian (4 Posts)
  101. stevieke (1 Post)
  102. megmefleg (1 Post)
  103. Boccara Jonathan (1 Post)
  104. Surinder singh (2 Posts)
  105. KrullWarKing (1 Post)
  106. brandnewdrew (1 Post)
  107. MrRoyce (1 Post)
  108. Spongerusher (1 Post)
  109. teraphy (2 Posts)
  110. Pekka Karalahti (3 Posts)
  111. Sergii (1 Post)
  112. Cassio11 (1 Post)
  113. myth (1 Post)
  114. spor (6 Posts)
  115. StagnantIce (2 Posts)
  116. shailendra (2 Posts)
  117. ext_user1 (1 Post)
  118. kenny_mk (1 Post)
  119. mpacheco (1 Post)
  120. Centurus (1 Post)
  121. andyfly (1 Post)
  122. darmandovargas@gmail.com (1 Post)
  123. zjuthhy (3 Posts)
  124. robshim (3 Posts)
  125. Tod (1 Post)
  126. bipen (2 Posts)
  127. alisyah (1 Post)
  128. Monz87 (1 Post)
  129. alssst (1 Post)
  130. aggie (1 Post)
  131. bradelsky (1 Post)
  132. lagrezd (1 Post)
  133. ma1986 (1 Post)
  134. Sabareesh (2 Posts)
  135. top_1 (1 Post)
  136. Vasanthoo7 (1 Post)
  137. garrek99 (2 Posts)
  138. opik (1 Post)
  139. shankar8rajah1 (1 Post)
  140. tdobberphul (4 Posts)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar