|
@ -117,6 +117,19 @@ var ExcelHandler = PreviewHandler.BaseHandler.extend({ |
|
|
var $pane = $('<div/>'); |
|
|
var $pane = $('<div/>'); |
|
|
$pane.addClass('tab-pane table-container'); |
|
|
$pane.addClass('tab-pane table-container'); |
|
|
$pane.attr('id', 'sheet-' + index); |
|
|
$pane.attr('id', 'sheet-' + index); |
|
|
|
|
|
var maximum_arrs = 1; |
|
|
|
|
|
sheet.forEach(function (arr) { |
|
|
|
|
|
if(arr.length>maximum_arrs){ |
|
|
|
|
|
maximum_arrs = arr.length; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
sheet.forEach(function (arr) { |
|
|
|
|
|
if(arr.length<maximum_arrs){ |
|
|
|
|
|
for (var i = arr.length; i < maximum_arrs; i++) { |
|
|
|
|
|
arr.push(""); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
$pane.handsontable({ |
|
|
$pane.handsontable({ |
|
|
data: sheet, |
|
|
data: sheet, |
|
|
rowHeaders: true, |
|
|
rowHeaders: true, |
|
@ -149,4 +162,4 @@ return { |
|
|
PowerPointHandler: PowerPointHandler, |
|
|
PowerPointHandler: PowerPointHandler, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
}); |