|
23 | 23 | excelFileFormat: 'xlshtml', // xmlss = XML Spreadsheet 2003 file format (XMLSS), xlshtml = Excel 2000 html format
|
24 | 24 | excelRTL: false, // true = Set Excel option 'DisplayRightToLeft'
|
25 | 25 | excelstyles: [], // e.g. ['border-bottom', 'border-top', 'border-left', 'border-right']
|
| 26 | + exportHiddenCells: false, // true = speed up export of large tables with hidden cells (hidden cells will be exported !) |
26 | 27 | fileName: 'tableExport',
|
27 | 28 | htmlContent: false,
|
28 | 29 | ignoreColumn: [],
|
|
109 | 110 | var ranges = [];
|
110 | 111 | var blob;
|
111 | 112 | var $hiddenTableElements = [];
|
112 |
| - var checkCellVisibilty = false; // used to speed up export of tables with extensive css styling |
| 113 | + var checkCellVisibilty = false; |
113 | 114 |
|
114 | 115 | $.extend(true, defaults, options);
|
115 | 116 |
|
|
414 | 415 |
|
415 | 416 | docNames.push($('<div />').text(ssName).html());
|
416 | 417 |
|
417 |
| - $hiddenTableElements = $table.find("tr, th, td").filter(":hidden"); |
418 |
| - checkCellVisibilty = $hiddenTableElements.length > 0; |
| 418 | + if ( defaults.exportHiddenCells === false ) { |
| 419 | + $hiddenTableElements = $table.find("tr, th, td").filter(":hidden"); |
| 420 | + checkCellVisibilty = $hiddenTableElements.length > 0; |
| 421 | + } |
419 | 422 |
|
420 | 423 | rowIndex = 0;
|
421 | 424 | colNames = GetColumnNames(this);
|
|
622 | 625 | docName = docName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31).trim();
|
623 | 626 | }
|
624 | 627 |
|
625 |
| - $hiddenTableElements = $table.find("tr, th, td").filter(":hidden"); |
626 |
| - checkCellVisibilty = $hiddenTableElements.length > 0; |
| 628 | + if ( defaults.exportHiddenCells === false ) { |
| 629 | + $hiddenTableElements = $table.find("tr, th, td").filter(":hidden"); |
| 630 | + checkCellVisibilty = $hiddenTableElements.length > 0; |
| 631 | + } |
627 | 632 |
|
628 | 633 | rowIndex = 0;
|
629 | 634 | ranges = [];
|
|
1075 | 1080 | var rowCount = 0;
|
1076 | 1081 | ranges = [];
|
1077 | 1082 |
|
1078 |
| - $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden"); |
1079 |
| - checkCellVisibilty = $hiddenTableElements.length > 0; |
| 1083 | + if ( defaults.exportHiddenCells === false ) { |
| 1084 | + $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden"); |
| 1085 | + checkCellVisibilty = $hiddenTableElements.length > 0; |
| 1086 | + } |
1080 | 1087 |
|
1081 | 1088 | $hrows = $(this).find('thead').find(defaults.theadSelector);
|
1082 | 1089 | $rows = collectRows ($(this));
|
|
1106 | 1113 | rowIndex = 0;
|
1107 | 1114 | ranges = [];
|
1108 | 1115 |
|
1109 |
| - $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden"); |
1110 |
| - checkCellVisibilty = $hiddenTableElements.length > 0; |
| 1116 | + if ( defaults.exportHiddenCells === false ) { |
| 1117 | + $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden"); |
| 1118 | + checkCellVisibilty = $hiddenTableElements.length > 0; |
| 1119 | + } |
1111 | 1120 |
|
1112 | 1121 | colNames = GetColumnNames(this);
|
1113 | 1122 |
|
|
0 commit comments