-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916936 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
6 changed files
with
28 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
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
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
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
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
23 changes: 23 additions & 0 deletions
23
poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTemp.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,23 @@ | ||
package org.apache.poi.xssf.usermodel; | ||
|
||
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
|
||
public class TestXSSFTemp { | ||
@Test | ||
public void testWrite() throws IOException { | ||
try(XSSFWorkbook wb = new XSSFWorkbook()) { | ||
XSSFSheet sheet = wb.createSheet(); | ||
XSSFRow row = sheet.createRow(0); | ||
for (int i = 0; i < 10000; i++) { | ||
XSSFCell cell = row.createCell(i); | ||
cell.setCellValue("cell " + i); | ||
} | ||
try (UnsynchronizedByteArrayOutputStream bos = UnsynchronizedByteArrayOutputStream.builder().get()) { | ||
wb.write(bos); | ||
} | ||
} | ||
} | ||
} |