forked from dhatim/fastexcel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
fastexcel-reader/src/test/java/org/dhatim/fastexcel/reader/ExcelFileWithCRLFTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.dhatim.fastexcel.reader; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.stream.Stream; | ||
|
||
import static org.dhatim.fastexcel.reader.Resources.open; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
public class ExcelFileWithCRLFTest { | ||
|
||
@Test | ||
public void testFileWithCRLF() throws IOException { | ||
try (InputStream inputStream = open("/xlsx/withStyleCRLF.xlsx"); | ||
ReadableWorkbook excel = new ReadableWorkbook(inputStream, new ReadingOptions(true, true))) { | ||
Sheet firstSheet = excel.getFirstSheet(); | ||
try (Stream<Row> rows = firstSheet.openStream()) { | ||
rows.forEach(r -> { | ||
if (r.getRowNum() > 1) { | ||
r.forEach(c -> { | ||
if (c != null) { | ||
assertNotNull(c.getDataFormatString()); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
} | ||
} | ||
|
||
} |
Binary file not shown.