作者 tangxvhui

调整excel数据输出

... ... @@ -782,10 +782,13 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent
//纵向-索引-第二列-员工id
//填充1,2 列
rowNum++
axisNum := fmt.Sprintf("%d", rowNum+5)
axisNum := fmt.Sprintf("%d", (rowNum-1)*3+6)
userName := eData.userIdMap[v2.Name]
xlsxFile.SetCellStr(sheetName, "A"+axisNum, v.Name)
xlsxFile.SetCellStr(sheetName, "B"+axisNum, userName)
axisEnd := fmt.Sprintf("%d", (rowNum-1)*3+6+2)
xlsxFile.MergeCell(sheetName, "A"+axisNum, "A"+axisEnd)
xlsxFile.MergeCell(sheetName, "B"+axisNum, "B"+axisEnd)
}
}
//列数量
... ... @@ -827,12 +830,13 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent
for _, v5 := range v4.Child {
//纵向-索引-第二列-员工id
rowNum++
axis := fmt.Sprintf("%s%d", colName, rowNum+5)
axis := fmt.Sprintf("%s%d", colName, (rowNum-1)*3+6)
key := eData.dataKey(v5.Name, v4.Name, v.Name, v3.Name)
if d, ok := eData.data[key]; ok {
xlsxFile.SetCellStr(sheetName, axis, d.String())
}
xlsxFile.SetRowHeight(sheetName, rowNum+5, 50)
axisEnd := fmt.Sprintf("%s%d", colName, (rowNum-1)*3+6+2)
xlsxFile.MergeCell(sheetName, axis, axisEnd)
}
}
}
... ...