values(dataset, keysAndStyles) cellStyle 생성관련 수정

master
mjkhan21 11 months ago
parent 657f7d0cf1
commit 534c83cfe0

@ -10,6 +10,7 @@ import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Stream;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.CellStyle;
@ -368,9 +369,14 @@ public class XLSWriter extends XLS {
if (!isEmpty(dataset)) {
int c = cell.getColumnIndex(),
r = cell.getRowIndex();
Object[] kas = Stream.of(keysAndStyles)
.map(obj -> !(obj instanceof Styler) ? obj : cellStyle((Styler)obj))
.toList()
.toArray();
for (Map<?, ?> rec: dataset) {
cell(r, c);
rowValues(rec, keysAndStyles);
rowValues(rec, kas);
++r;
}
}

Loading…
Cancel
Save