|
|
@ -3,21 +3,23 @@ package com.alibaba.easyexcel.test.core.encrypt; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileInputStream; |
|
|
|
import java.io.FileInputStream; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
|
|
|
import java.math.RoundingMode; |
|
|
|
|
|
|
|
import java.text.DecimalFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
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.SimpleData; |
|
|
|
import com.alibaba.easyexcel.test.util.TestFileUtil; |
|
|
|
import com.alibaba.easyexcel.test.util.TestFileUtil; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.junit.BeforeClass; |
|
|
|
|
|
|
|
import org.junit.FixMethodOrder; |
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
import org.junit.runners.MethodSorters; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* @author Jiaju Zhuang |
|
|
|
* @author Jiaju Zhuang |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING) |
|
|
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING) |
|
|
@ -28,6 +30,15 @@ public class EncryptDataTest { |
|
|
|
private static File file07OutputStream; |
|
|
|
private static File file07OutputStream; |
|
|
|
private static File file03OutputStream; |
|
|
|
private static File file03OutputStream; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testformat() { |
|
|
|
|
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("0.00"); |
|
|
|
|
|
|
|
decimalFormat.setRoundingMode(RoundingMode.HALF_UP); |
|
|
|
|
|
|
|
BigDecimal bigDecimal = new BigDecimal("0.105"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(decimalFormat.format(bigDecimal)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@BeforeClass |
|
|
|
@BeforeClass |
|
|
|
public static void init() { |
|
|
|
public static void init() { |
|
|
|
file07 = TestFileUtil.createNewFile("encrypt07.xlsx"); |
|
|
|
file07 = TestFileUtil.createNewFile("encrypt07.xlsx"); |
|
|
|