|
|
|
@ -6,19 +6,15 @@ import java.io.FileOutputStream;
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import org.junit.Assert; |
|
|
|
|
import org.junit.BeforeClass; |
|
|
|
|
import org.junit.FixMethodOrder; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
import org.junit.runners.MethodSorters; |
|
|
|
|
|
|
|
|
|
import com.alibaba.easyexcel.test.core.simple.SimpleData; |
|
|
|
|
import com.alibaba.easyexcel.test.core.simple.SimpleDataListener; |
|
|
|
|
import com.alibaba.easyexcel.test.core.simple.SimpleDataSheetNameListener; |
|
|
|
|
import com.alibaba.easyexcel.test.util.TestFileUtil; |
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
|
import com.alibaba.excel.util.FileUtils; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
@ -51,12 +47,12 @@ public class EncryptDataTest {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void t01ReadAndWriteStream07() throws Exception { |
|
|
|
|
public void t03ReadAndWriteStream07() throws Exception { |
|
|
|
|
readAndWriteStream(file07OutputStream, ExcelTypeEnum.XLSX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void t02ReadAndWriteStream03() throws Exception { |
|
|
|
|
public void t04ReadAndWriteStream03() throws Exception { |
|
|
|
|
readAndWriteStream(file03OutputStream, ExcelTypeEnum.XLS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -72,8 +68,8 @@ public class EncryptDataTest {
|
|
|
|
|
fileOutputStream.close(); |
|
|
|
|
|
|
|
|
|
FileInputStream fileInputStream = new FileInputStream(file); |
|
|
|
|
EasyExcel.read(fileInputStream, EncryptData.class, new EncryptDataListener()).password("123456") |
|
|
|
|
.excelType(excelType).sheet().doRead(); |
|
|
|
|
EasyExcel.read(fileInputStream, EncryptData.class, new EncryptDataListener()).password("123456").sheet() |
|
|
|
|
.doRead(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<SimpleData> data() { |
|
|
|
|