Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zorglube committed Feb 25, 2023
1 parent fe0b1b9 commit 87f322c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ The javadoc for the last release is available [here](http://www.javadoc.io/doc/o
Create a workbook with a single worksheet and a few cells with the different supported data types.

```java
try (OutputStream os = ...) {
Workbook wb = new Workbook(os, "MyApplication", "1.0");
try (OutputStream os = ..., Workbook wb = new Workbook(os, "MyApplication", "1.0");) {
Worksheet ws = wb.newWorksheet("Sheet 1");
ws.value(0, 0, "This is a string in A1");
ws.value(0, 1, new Date());
ws.value(0, 2, 1234);
ws.value(0, 3, 123456L);
ws.value(0, 4, 1.234);
wb.finish();
}
```

Expand Down Expand Up @@ -285,8 +283,7 @@ ws.fitToHeight(999);

Each worksheet is generated by a different thread.
```java
try (OutputStream os = ...) {
Workbook wb = new Workbook(os, "MyApplication", "1.0");
try (OutputStream os = ...; Workbook wb = new Workbook(os, "MyApplication", "1.0");) {
Worksheet ws1 = wb.newWorksheet("Sheet 1");
Worksheet ws2 = wb.newWorksheet("Sheet 2");
CompletableFuture<Void> cf1 = CompletableFuture.runAsync(() -> {
Expand All @@ -298,7 +295,6 @@ try (OutputStream os = ...) {
...
});
CompletableFuture.allOf(cf1, cf2).get();
wb.finish();
}
```

Expand Down

0 comments on commit 87f322c

Please sign in to comment.