|
@@ -208,7 +208,7 @@ function writeStyles(stylesObj){
|
|
|
let textRotation = 0;
|
|
|
let newHorizontal = excelStyle[JV.CONTROL_PROPS[2]];
|
|
|
let newVertical = excelStyle[JV.CONTROL_PROPS[3]];
|
|
|
- if (excelStyle[JV.CONTROL_PROPS[5]]) {
|
|
|
+ if (excelStyle[JV.CONTROL_PROPS[5]] && !strUtil.convertStrToBoolean(excelStyle[JV.CONTROL_PROPS[JV.CONTROL_PROP_IDX_CLOSE_OUTPUT]])) {
|
|
|
newVertical = excelStyle[JV.CONTROL_PROPS[5]];
|
|
|
}
|
|
|
if (parseInt(excelStyle.fontAngle) !== 0) {
|
|
@@ -255,7 +255,7 @@ function writeStyles(stylesObj){
|
|
|
if (strUtil.convertStrToBoolean(excelStyle[JV.CONTROL_PROPS[0]])) {
|
|
|
alignStr += ' shrinkToFit="1"';
|
|
|
}
|
|
|
- if (strUtil.convertStrToBoolean(excelStyle[JV.CONTROL_PROPS[4]])) {
|
|
|
+ if (strUtil.convertStrToBoolean(excelStyle[JV.CONTROL_PROPS[4]]) && !strUtil.convertStrToBoolean(excelStyle[JV.CONTROL_PROPS[6]])) {
|
|
|
alignStr += ' wrapText="1"';
|
|
|
}
|
|
|
if (textRotation !== 0) {
|
|
@@ -352,19 +352,19 @@ function writeSheets(pageData, paperSize, sharedStrList, stylesObj, isSinglePage
|
|
|
private_pushDftFont();
|
|
|
private_buildFirstDftStyle();
|
|
|
if (isSinglePage) {
|
|
|
- rst.push(writeSheet(pageData, null, paperSize, sharedStrList, stylesObj, null));
|
|
|
+ rst.push(writeSheet(pageData, null, paperSize, sharedStrList, stylesObj, null, true));
|
|
|
} else {
|
|
|
for (let i = 0; i < pageData.items.length; i++) {
|
|
|
let appointedMergeBand = null;
|
|
|
if (custSheetMergeBands && custSheetMergeBands.length > i) {
|
|
|
appointedMergeBand = custSheetMergeBands[i];
|
|
|
}
|
|
|
- rst.push(writeSheet(pageData, pageData.items[i], paperSize, sharedStrList, stylesObj, appointedMergeBand));
|
|
|
+ rst.push(writeSheet(pageData, pageData.items[i], paperSize, sharedStrList, stylesObj, appointedMergeBand, i === 0));
|
|
|
}
|
|
|
}
|
|
|
return rst;
|
|
|
}
|
|
|
-function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, appointedMergeBand){
|
|
|
+function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, appointedMergeBand, isFirstSheet){
|
|
|
let rst = [], xPos = [], yPos = [], yMultiPos = [], currentMergeBorder = null,
|
|
|
headerStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
|
let currentPageMergePos = null; //在 JV.PAGING_OPTION_INFINITY 场合应用
|
|
@@ -749,6 +749,7 @@ function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, ap
|
|
|
let valIdx = private_getSharedStrIdx(theShtData.cells[cIdx][JV.PROP_VALUE]);
|
|
|
cellObj.v = valIdx;
|
|
|
}
|
|
|
+
|
|
|
rowIdx2 = theYPos.indexOf(theShtData.cells[cIdx][JV.PROP_AREA][JV.PROP_BOTTOM]);
|
|
|
colIdx2 = xPos.indexOf(theShtData.cells[cIdx][JV.PROP_AREA][JV.PROP_RIGHT]);
|
|
|
if ((rowIdx2 - rowIdx1 > 1) || (colIdx2 - colIdx1 > 1)) {
|
|
@@ -806,7 +807,11 @@ function writeSheet(pageData, sheetData, paperSize, sharedStrList, stylesObj, ap
|
|
|
rst.push('<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">');
|
|
|
let colStr = private_getCellIdxStr(xPos.length - 3);
|
|
|
rst.push('<dimension ref="A1:' + colStr + '' + yPos.length + '"/>');
|
|
|
- rst.push('<sheetViews><sheetView tabSelected="1" workbookViewId="0">');
|
|
|
+ if (isFirstSheet) {
|
|
|
+ rst.push('<sheetViews><sheetView tabSelected="1" workbookViewId="0">');
|
|
|
+ } else {
|
|
|
+ rst.push('<sheetViews><sheetView workbookViewId="0">');
|
|
|
+ }
|
|
|
//rst.push('<selection sqref="A1:' + colStr + '1"/>');
|
|
|
rst.push('<selection sqref="A1:A1"/>');
|
|
|
rst.push('</sheetView></sheetViews>');
|