Commit 4f3b917f authored by 吴霞's avatar 吴霞

导出excel多个sheet

parent 0b292f0b
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.source=1.5
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
<artifactId>download</artifactId> <artifactId>download</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<dependencies> <dependencies>
<!--mybatis核心包 --> <!--mybatis核心包 -->
<dependency> <dependency>
...@@ -60,40 +58,8 @@ ...@@ -60,40 +58,8 @@
<artifactId>poi-excelant</artifactId> <artifactId>poi-excelant</artifactId>
<version>3.11-beta2</version> <version>3.11-beta2</version>
</dependency> </dependency>
<!--<dependency> -->
<!--<groupId>com.huawei.paas.cse</groupId> -->
<!--<artifactId>cse-solution-service-engine</artifactId> -->
<!--<exclusions> -->
<!--<exclusion> -->
<!--<groupId>org.slf4j</groupId> -->
<!--<artifactId>slf4j-log4j12</artifactId> -->
<!--</exclusion> -->
<!--</exclusions> -->
<!--</dependency> -->
<!--<dependency> -->
<!--<groupId>org.apache.servicecomb</groupId> -->
<!--<artifactId>spring-boot-starter-provider</artifactId> -->
<!--</dependency> -->
</dependencies> </dependencies>
<!--<dependencyManagement> -->
<!--<dependencies> -->
<!--<dependency> -->
<!--<groupId>org.apache.servicecomb</groupId> -->
<!--<artifactId>java-chassis-dependencies-springboot2</artifactId> -->
<!--<version>1.1.0.B018</version> -->
<!--<type>pom</type> -->
<!--<scope>import</scope> -->
<!--</dependency> -->
<!--<dependency> -->
<!--<groupId>com.huawei.paas.cse</groupId> -->
<!--<artifactId>cse-dependency</artifactId> -->
<!--<version>2.3.46</version> -->
<!--<type>pom</type> -->
<!--<scope>import</scope> -->
<!--</dependency> -->
<!--</dependencies> -->
<!--</dependencyManagement> -->
<build> <build>
<resources> <resources>
...@@ -104,6 +70,29 @@ ...@@ -104,6 +70,29 @@
</includes> </includes>
</resource> </resource>
</resources> </resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.sict.excel.myExcel</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
</project> </project>
\ No newline at end of file
...@@ -67,8 +67,8 @@ public class myExcel { ...@@ -67,8 +67,8 @@ public class myExcel {
HSSFSheet sheet11 = screeningRankQgExcel.getSheet11(workbook); HSSFSheet sheet11 = screeningRankQgExcel.getSheet11(workbook);
workbook.setSheetName(10, "门诊筛查排名-血检人数"); workbook.setSheetName(10, "门诊筛查排名-血检人数");
// FileOutputStream outputStream = new FileOutputStream("E:/2019/excel/GICC+map+data.xls");
FileOutputStream outputStream = new FileOutputStream("E:/2019/excel/GICC+map+data.xls"); FileOutputStream outputStream = new FileOutputStream("/home/gcsvr/excel/GICC+map+data.xls");
workbook.write(outputStream); workbook.write(outputStream);
outputStream.close(); outputStream.close();
} }
......
...@@ -22,7 +22,7 @@ public class ScreeningRankQgExcel { ...@@ -22,7 +22,7 @@ public class ScreeningRankQgExcel {
ExportExcelUtil<ScreeningRankDTO> util = new ExportExcelUtil<ScreeningRankDTO>(); ExportExcelUtil<ScreeningRankDTO> util = new ExportExcelUtil<ScreeningRankDTO>();
String[] columnNames = {"排名","医联体名称","血检人数"}; String[] columnNames = {"排名","医联体名称","血检人数"};
List<ScreeningRankDTO> list = mapper.getScreeningRankDTOs(); List<ScreeningRankDTO> list = mapper.getScreeningRankDTOs();
String path = "E:/2019/excel/" + "门诊筛查排名-血检人数.xls"; //String path = "E:/2019/excel/" + "门诊筛查排名-血检人数.xls";
HSSFSheet sheet = util.exportExcel(workbook,"门诊筛查排名-血检人", columnNames, list, ExportExcelUtil.EXCEl_FILE_2007); HSSFSheet sheet = util.exportExcel(workbook,"门诊筛查排名-血检人", columnNames, list, ExportExcelUtil.EXCEl_FILE_2007);
sqlSession.commit(); sqlSession.commit();
......
...@@ -156,7 +156,7 @@ public class SerumTest { ...@@ -156,7 +156,7 @@ public class SerumTest {
cell112.setCellValue(String.valueOf(shchyyinInteger.intValue()+gecaintInteger.intValue()+qgInteger.intValue())); cell112.setCellValue(String.valueOf(shchyyinInteger.intValue()+gecaintInteger.intValue()+qgInteger.intValue()));
FileOutputStream outputStream = new FileOutputStream("E:/2019/excel/筛查监控-血清学检查.xls"); //FileOutputStream outputStream = new FileOutputStream("E:/2019/excel/筛查监控-血清学检查.xls");
sqlSession.commit(); sqlSession.commit();
shchyy.commit(); shchyy.commit();
......
#Generated by Maven Integration for Eclipse #Generated by Maven Integration for Eclipse
#Fri Nov 22 09:15:51 CST 2019 #Fri Nov 29 10:09:37 CST 2019
version=1.0-SNAPSHOT version=1.0-SNAPSHOT
groupId=download groupId=download
m2e.projectName=download m2e.projectName=download
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
<artifactId>download</artifactId> <artifactId>download</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<dependencies> <dependencies>
<!--mybatis核心包 --> <!--mybatis核心包 -->
<dependency> <dependency>
...@@ -60,40 +58,8 @@ ...@@ -60,40 +58,8 @@
<artifactId>poi-excelant</artifactId> <artifactId>poi-excelant</artifactId>
<version>3.11-beta2</version> <version>3.11-beta2</version>
</dependency> </dependency>
<!--<dependency> -->
<!--<groupId>com.huawei.paas.cse</groupId> -->
<!--<artifactId>cse-solution-service-engine</artifactId> -->
<!--<exclusions> -->
<!--<exclusion> -->
<!--<groupId>org.slf4j</groupId> -->
<!--<artifactId>slf4j-log4j12</artifactId> -->
<!--</exclusion> -->
<!--</exclusions> -->
<!--</dependency> -->
<!--<dependency> -->
<!--<groupId>org.apache.servicecomb</groupId> -->
<!--<artifactId>spring-boot-starter-provider</artifactId> -->
<!--</dependency> -->
</dependencies> </dependencies>
<!--<dependencyManagement> -->
<!--<dependencies> -->
<!--<dependency> -->
<!--<groupId>org.apache.servicecomb</groupId> -->
<!--<artifactId>java-chassis-dependencies-springboot2</artifactId> -->
<!--<version>1.1.0.B018</version> -->
<!--<type>pom</type> -->
<!--<scope>import</scope> -->
<!--</dependency> -->
<!--<dependency> -->
<!--<groupId>com.huawei.paas.cse</groupId> -->
<!--<artifactId>cse-dependency</artifactId> -->
<!--<version>2.3.46</version> -->
<!--<type>pom</type> -->
<!--<scope>import</scope> -->
<!--</dependency> -->
<!--</dependencies> -->
<!--</dependencyManagement> -->
<build> <build>
<resources> <resources>
...@@ -104,6 +70,29 @@ ...@@ -104,6 +70,29 @@
</includes> </includes>
</resource> </resource>
</resources> </resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.sict.excel.myExcel</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
</project> </project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>download</groupId>
<artifactId>download</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer>
<mainClass>com.sict.excel.myExcel</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
#Generated by Maven
#Mon Nov 25 15:12:19 CST 2019
version=1.0-SNAPSHOT
groupId=download
artifactId=download
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\ScreeningRankGecaExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\GastroscopeTestDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\EarlyCancerHospitalDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\EarlyCancerRankDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\mapper\DownloadMapper.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\TestExportExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\utils\SqlSessionUtil.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\HpPositiveDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\AnalysisGraphicDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\SerumTest.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\RiskDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\myExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\AnalysisHospitalEarlyCancerExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\Diagnosis.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\ScreeningRankDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\ProvinceEarlyCancerRankExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\utils\ExportExcelUtil.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\GastroscopeTest.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\AnalysisProvinceExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\AnalysisGraphicExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\SerumStatisticsDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\ScreeningRankQgExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\ScreeningRankShchyyExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\AnalysisProvinceDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\bo\AnalysisGraphicBO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\Student.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\DiagnosisDTO.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\test\ScreeningRankProvinceExcel.java
E:\BIGDATA\HadoopSpace\download\src\main\java\com\sict\excel\dto\ScreeningRankProvinceDTO.java
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment