mirror of https://github.com/alibaba/easyexcel
Jiaju Zhuang
3 years ago
5 changed files with 62 additions and 2 deletions
@ -0,0 +1,17 @@
|
||||
package com.alibaba.easyexcel.test.temp.write; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ContentStyle; |
||||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
||||
import com.alibaba.excel.enums.BooleanEnum; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class TempWriteData { |
||||
|
||||
@ExcelProperty(" 换行\r\n \\ \r\n的名字") |
||||
@HeadStyle(wrapped = BooleanEnum.TRUE) |
||||
@ContentStyle(wrapped = BooleanEnum.TRUE) |
||||
private String name; |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.alibaba.easyexcel.test.temp.write; |
||||
|
||||
import com.alibaba.easyexcel.test.util.TestFileUtil; |
||||
import com.alibaba.excel.EasyExcel; |
||||
import com.alibaba.excel.util.ListUtils; |
||||
|
||||
import org.junit.Ignore; |
||||
import org.junit.Test; |
||||
|
||||
@Ignore |
||||
public class TempWriteTest { |
||||
|
||||
@Test |
||||
public void write() { |
||||
TempWriteData tempWriteData = new TempWriteData(); |
||||
tempWriteData.setName("zs\r\n \\ \r\n t4"); |
||||
EasyExcel.write(TestFileUtil.getPath() + "TempWriteTest" + System.currentTimeMillis() + ".xlsx", |
||||
TempWriteData.class) |
||||
.sheet() |
||||
.doWrite(ListUtils.newArrayList(tempWriteData)); |
||||
} |
||||
} |
Loading…
Reference in new issue