Browse Source

fix utf decode

pull/3132/head
gongxuanzhang 2 years ago
parent
commit
b835619942
  1. 5
      easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/rare/ReadTest.java

5
easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/rare/ReadTest.java

@ -8,13 +8,12 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import java.io.File;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
*
* 记录一些不太常见的案例 * 记录一些不太常见的案例
*
* @author gxz gongxuanzhang@foxmail.com * @author gxz gongxuanzhang@foxmail.com
**/ **/
public class ReadTest { public class ReadTest {
@ -22,7 +21,6 @@ public class ReadTest {
/** /**
* 当excel有需要转义的 如x005特殊符号时需要通过utf decode解码 * 当excel有需要转义的 如x005特殊符号时需要通过utf decode解码
*
**/ **/
@Test @Test
public void readX005() throws Exception { public void readX005() throws Exception {
@ -32,7 +30,6 @@ public class ReadTest {
XSSFRow row = xssfSheet.getRow(0); XSSFRow row = xssfSheet.getRow(0);
String poiValue = row.getCell(0).getStringCellValue(); String poiValue = row.getCell(0).getStringCellValue();
List<Map<Integer, Object>> list = EasyExcel.read(fileName) List<Map<Integer, Object>> list = EasyExcel.read(fileName)
//.useDefaultListener(false)
.sheet(0) .sheet(0)
.headRowNumber(0).doReadSync(); .headRowNumber(0).doReadSync();
Map<Integer, Object> easyExcelRow = list.get(0); Map<Integer, Object> easyExcelRow = list.get(0);

Loading…
Cancel
Save