// 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 flagStatus = false;
for (var i = 0; i < cm.getColumnCount(); i++) {
if(i!=0){
if (includeHidden || !cm.isHidden(i)) {
if(cm.getColumnHeader(i) == 'Fitment'){
flagStatus= true;
}
var w = cm.getColumnWidth(i)
totalWidthInPixels += w;
colXml += '<ss:Column ss:AutoFitWidth="1" ss:Width="' + w + '" />';
headerXml += '<ss:Cell ss:StyleID="headercell">' +
'<ssata ss:Type="String">' + cm.getColumnHeader(i) + '</ssata>' +
'<ss:NamedCell ss:Name="Print_Titles" /></ss:Cell>';
var fld = this.store.recordType.prototype.fields.get(cm.getDataIndex(i));
switch("String") {
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 = {
height: 9000,
width: Math.floor(totalWidthInPixels * 30) + 50,
xml:''
// Generate the data rows from the data in the Store
for (var i = 0, it = this.store.data.items, l = it.length; i < l; i++) {
t += '<ss:Row>';
var cellClass = (i & 1) ? 'odd' : 'even';
r = it[i].data;
var k = 0;
for (var j = 0; j < cm.getColumnCount(); j++) {
if (includeHidden || !cm.isHidden(j)) {
var v = r[cm.getDataIndex(j)];
if(j!=0){
if(j==1){
v = i+1;
t += '<ss:Cell ss:StyleID="' + cellClass + cellTypeClass[k] + '"><ssata ss:Type="' + cellType[k] + '">';
if (cellType[k] == 'DateTime') {
t += v.format('Y-m-d');
} else {
t += v;
}
t +='</ssata></ss:Cell>';
k++;
}else if(flagStatus && j==7){
var fouthcolumnValue= r[cm.getDataIndex(8)];
var fitmentValue= null;
fitmentValue = r[cm.getDataIndex(11)];
var pasScore=(passPercentageStr =passPercentageStr != undefined?passPercentageStr:0);
if(fouthcolumnValue == null || fouthcolumnValue == '') {
v = '';
} else if(fouthcolumnValue*1>= pasScore*1){
if(fitmentValue == '2.00'){
v = 'OverFit';
}else{
v = 'Fit';
}
} else if (fouthcolumnValue*1 < pasScore*1){
v = 'UnFit';
}
t += '<ss:Cell ss:StyleID="' + cellClass + cellTypeClass[k] + '"><ssata ss:Type="' + cellType[k] + '">';
if (cellType[k] == 'DateTime') {
t += v.format('Y-m-d');
} else {
t += v;
}
t +='</ssata></ss:Cell>';
k++;
}else{
t += '<ss:Cell ss:StyleID="' + cellClass + cellTypeClass[k] + '"><ssata ss:Type="' + cellType[k] + '">';
if (cellType[k] == 'DateTime') {
t += v.format('Y-m-d');
} else {
t += v;
}
t +='</ssata></ss:Cell>';
k++;
}
}
}
}
t += '</ss:Row>';
In Mozilla browser when i am clicking on download button it's opening a pop-up window for download...
But same thing when i am doing in Internet Explore, pop-up window is not coming. And Internet Explorer browser going in to hang Stage.
But when i am clicking on download button in internet explorer then request is going to Export.js. But it's not returning pop-up window for download...
One more point i want to clear..
this functionality is working fine with firefox in both Linux and Windows.
But in the case of Internet Explorer it's going in to hang stage. For IE, i am using Windows.