提交 00314c7d 编写于 作者: 蔡祥熠

Merge branch 'cherry-pick-67e45b01' into 'wrdp_java8'

Merge branch 'fix/export_More_than_26' into 'wrdp'

See merge request o2oa/o2oa!5378
......@@ -2648,7 +2648,8 @@ MWF.xApplication.process.Xform.DatagridPC.ExcelUtils = new Class({
if( !colWidthArr )widthArray.push( {wpx: 100} );
var at = String.fromCharCode(97 + i).toUpperCase();
// var at = String.fromCharCode(97 + i).toUpperCase();
var at = this.index2ColName(i);
var di = dataInfo[at+"1"];
// di.v = v;
// di.t = "s";
......
......@@ -2666,7 +2666,8 @@ MWF.xApplication.process.Xform.DatatablePC.ExcelUtils = new Class({
if( !colWidthArr )widthArray.push( {wpx: 100} );
var at = String.fromCharCode(97 + i).toUpperCase();
// var at = String.fromCharCode(97 + i).toUpperCase();
var at = this.index2ColName(i);
var di = dataInfo[at+"1"];
// di.v = v;
// di.t = "s";
......
......@@ -2216,7 +2216,8 @@ MWF.xApplication.process.Xform.Datatemplate.ExcelUtils = new Class({
if( !colWidthArr )widthArray.push( {wpx: 100} );
var at = String.fromCharCode(97 + i).toUpperCase();
// var at = String.fromCharCode(97 + i).toUpperCase();
var at = this.index2ColName(i);
var di = dataInfo[at+"1"];
// di.v = v;
// di.t = "s";
......
......@@ -1398,7 +1398,8 @@ MWF.xApplication.query.Query.Importer.ExcelUtils = new Class({
if( !colWidthArr )widthArray.push( {wpx: 100} );
var at = String.fromCharCode(97 + i).toUpperCase();
// var at = String.fromCharCode(97 + i).toUpperCase();
var at = this.index2ColName(i);
var di = dataInfo[at+"1"];
// di.v = v;
// di.t = "s";
......
......@@ -1104,7 +1104,8 @@ MWF.xApplication.query.Query.Statement.ExcelUtils = new Class({
if( !colWidthArr )widthArray.push( {wpx: 100} );
var at = String.fromCharCode(97 + i).toUpperCase();
// var at = String.fromCharCode(97 + i).toUpperCase();
var at = this.index2ColName(i);
var di = dataInfo[at+"1"];
// di.v = v;
// di.t = "s";
......
......@@ -1329,6 +1329,20 @@ MWF.xApplication.query.TableDesigner.Table.ExcelUtils = new Class({
window.navigator.msSaveBlob( url, saveName);
}
},
index2ColName : function( index ){
if (index < 0) {
return null;
}
var num = 65;// A的Unicode码
var colName = "";
do {
if (colName.length > 0)index--;
var remainder = index % 26;
colName = String.fromCharCode(remainder + num) + colName;
index = (index - remainder) / 26;
} while (index > 0);
return colName;
},
export : function(array, fileName){
this._loadResource( function(){
data = xlsxUtils.format2Sheet(array, 0, 0, null);//偏移3行按keyMap顺序转换
......@@ -1341,7 +1355,8 @@ MWF.xApplication.query.TableDesigner.Table.ExcelUtils = new Class({
widthArray.push( {wpx: 100} );
var at = String.fromCharCode(97 + i).toUpperCase();
// var at = String.fromCharCode(97 + i).toUpperCase();
var at = this.index2ColName(i);
var di = dataInfo[at+"1"];
// di.v = v;
// di.t = "s";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册