public class Worksheet
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
finish()
Finish the construction of this worksheet.
|
void |
formula(int r,
int c,
java.lang.String expression)
Set the cell formula at the given coordinates.
|
java.lang.String |
getName()
Get worksheet name.
|
Workbook |
getWorkbook()
Get parent workbook.
|
Range |
range(int top,
int left,
int bottom,
int right)
Create a new range of cells.
|
StyleSetter |
style(int r,
int c)
Get a new style setter for a cell.
|
java.lang.Object |
value(int r,
int c)
Get the cell value (or formula) at the given coordinates.
|
void |
value(int r,
int c,
java.lang.Object value)
Set the cell value at the given coordinates.
|
public java.lang.String getName()
public Workbook getWorkbook()
public void value(int r,
int c,
java.lang.Object value)
r - Zero-based row number.c - Zero-based column number.value - Cell value. Supported types are
String, Date, LocalDate, LocalDateTime, ZonedDateTime
and Number implementations. Note Excel timestamps do not carry
any timezone information; Date values are converted to an Excel
serial number with the system timezone. If you need a specific timezone,
prefer passing a ZonedDateTime.public java.lang.Object value(int r,
int c)
r - Zero-based row number.c - Zero-based column number.Formula).public void formula(int r,
int c,
java.lang.String expression)
r - Zero-based row number.c - Zero-based column number.expression - Cell formula expression.public StyleSetter style(int r, int c)
r - Zero-based row number.c - Zero-based column number.public Range range(int top, int left, int bottom, int right)
top <= bottom and left <=
right.top - Top row.left - Left column.bottom - Bottom row.right - Right column.public void finish()
throws java.io.IOException
java.io.IOException - If an I/O error occurs.