Browse Source

wifi热点分布导出excel,office不能打开问题

jun.zhou 9 years ago
parent
commit
ca4347369e

+ 2 - 1
src/main/java/com/cloudcross/ssp/web/back/main/ap/ApmacController.java

@@ -1025,7 +1025,8 @@ public class ApmacController extends SimpleController {
 		String fileName = "report" + df2.format(new Date());
 		response.setHeader("Content-Disposition", "attachment;filename="+ fileName + ".xls");
 		// 需要对excel的列的总数进行指定
-		int column = 4;
+		//为了使office的excel也能打开导出的表格,在导出模板中MergeAcross>实际导出的列,且column>MergeAcross
+		int column = 6;
 		map.put("dataSize", (wifiSumList.size() + 100));
 		map.put("column", column);
 

+ 1 - 1
src/main/resources/template/excel/wifiSumList.ftl

@@ -51,7 +51,7 @@
    <Column ss:Index="5" ss:AutoFitWidth="0" ss:Width="74.25"/>
    <Column ss:Width="63"/>
    <Row>
-    <Cell ss:MergeAcross="12"><Data ss:Type="String">省:${cn!}   市:${cnCity!}    数聚场景:${placeName!}  搜索:${searchValue!}	</Data></Cell>
+    <Cell ss:MergeAcross="5"><Data ss:Type="String">省:${cn!}   市:${cnCity!}    数聚场景:${placeName!}  搜索:${searchValue!}	</Data></Cell>
    </Row>
    <Row>
 	    <Cell><Data ss:Type="String">省</Data></Cell>