File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 61
61
*/
62
62
module . constant ( 'uiGridExporterConstants' , {
63
63
featureName : 'exporter' ,
64
+ rowHeaderColName : 'treeBaseRowHeaderCol' ,
64
65
ALL : 'all' ,
65
66
VISIBLE : 'visible' ,
66
67
SELECTED : 'selected' ,
67
68
CSV_CONTENT : 'CSV_CONTENT' ,
68
69
BUTTON_LABEL : 'BUTTON_LABEL' ,
69
- FILE_NAME : 'FILE_NAME'
70
+ FILE_NAME : 'FILE_NAME' ,
71
+ PIXEL_PER_UNIT : 75
70
72
} ) ;
71
73
72
74
/**
1533
1535
// The standard column width in Microsoft Excel 2000 is 8.43 characters based on fixed-width Courier font
1534
1536
// Width of 10 in excel is 75 pixels
1535
1537
var colWidths = [ ] ;
1536
- var startDataIndex = grid . treeBase ? grid . treeBase . numberLevels : ( grid . enableRowSelection !== false ? 1 : 0 ) ;
1538
+ var startDataIndex = grid . treeBase ? grid . treeBase . numberLevels : ( grid . enableRowSelection ? 1 : 0 ) ;
1537
1539
for ( var i = startDataIndex ; i < grid . columns . length ; i ++ ) {
1538
- colWidths . push ( { width : ( grid . columns [ i ] . drawnWidth / 75 ) * 10 } ) ;
1540
+ if ( grid . columns [ i ] . field !== uiGridExporterConstants . rowHeaderColName ) {
1541
+ colWidths . push ( { width : ( grid . columns [ i ] . drawnWidth / uiGridExporterConstants . PIXEL_PER_UNIT ) * 10 } ) ;
1542
+ }
1539
1543
}
1540
1544
sheet . setColumns ( colWidths ) ;
1541
1545
You can’t perform that action at this time.
0 commit comments