public static class WriteExcel.Area
extends java.lang.Object
Constructor and Description |
---|
Area()
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
WriteExcel.Area |
addDataFilterLine()
Creates a Data filter line as row 0.
|
WriteExcel.Area |
addRow(java.util.ArrayList<java.lang.String> oRow)
Adds a row of columns to the Area row array.
|
WriteExcel.Area |
addRow(java.util.ArrayList<java.lang.String> oRow,
int nStripe)
Adds a row of columns to the Area row array and adds a stripe mark.
|
WriteExcel.Area |
addRow(java.util.ArrayList<java.lang.String> oRow,
java.lang.String sRowFmt)
Adds a row of columns to the Area row array along with a row format specifier.
|
WriteExcel.Area |
addRow(java.lang.String[] sRows)
Adds a row of columns to the Area row array.
|
WriteExcel.Area |
addRow(java.lang.String[] sRows,
int nStripe)
Adds a row of columns to the Area row array and adds a stripe mark.
|
WriteExcel.Area |
addRow(java.lang.String[] sRows,
java.lang.String sRowFmt)
Adds a row of columns to the Area row array along with a row format specifier.
|
WriteExcel.Area |
colWidth(int nCol,
int nChars)
Sets the width of the specified column to nChars.
|
WriteExcel.Area |
colWidth(int n1stCol,
int nLastCol,
int nChars)
Sets the width of a set of columns to nChars.
|
int |
getAbsRow()
Return next absolute row.
|
int |
getBaseCol()
Return absolute column of start of Area on sheet.
|
int |
getBaseRow()
Return absolute row of start of Area on sheet.
|
int |
getDataRow()
Return absolute row of first data row.
|
int |
getHdrCount()
Return size of Header array.
|
int |
getRowCount()
Return size of Rows array.
|
java.util.ArrayList<java.lang.String[]> |
getRows()
Gets the current row array contents.
|
java.lang.String |
getSheet()
Return Sheet name area.
|
WriteExcel |
getWriter()
Return WriteExcel for this area.
|
WriteExcel.Area |
header(java.lang.String sCols)
Adds a set of columns to the header array.
|
WriteExcel.Area |
header(java.lang.String sCols,
java.lang.String sHdrFmt)
Adds a set of columns to the header array and applies a default row format specifier.
|
WriteExcel.Area |
writeArea()
Writes the Area to sCurrent sheet.
|
WriteExcel.Area |
zapColText(int nRow,
int nCol,
java.lang.String sText)
Changes the column text for nHdr and nCol.
|
WriteExcel.Area |
zapHdrFmt(int nHdr,
int nCol,
java.lang.String sFmt)
Changes the header format specifier for the specified nHdr and nCol.
|
WriteExcel.Area |
zapHdrText(int nHdr,
int nCol,
java.lang.String sText)
Changes the header text for the specified nHdr and nCol.
|
public WriteExcel.Area addDataFilterLine()
If the top rows of a sheet has merged values, the Excel Data filter is impeded. Calling this method ensures row 0 of a sheet has an empty cell for every column in the sheet. This makes the Data filter function work properly.
public WriteExcel.Area addRow(java.util.ArrayList<java.lang.String> oRow) throws java.lang.Exception
Each column string can contain a formatting mark which is parsed according to format specifier.
java.lang.Exception
public WriteExcel.Area addRow(java.util.ArrayList<java.lang.String> oRow, int nStripe) throws java.lang.Exception
Each column string can contain a formatting mark which is parsed according to format specifier.
nStripe
- Stripe option. 0 - no stripe, odd number - #odd background, Even number - #evn backgroundjava.lang.Exception
public WriteExcel.Area addRow(java.util.ArrayList<java.lang.String> oRow, java.lang.String sRowFmt) throws java.lang.Exception
Each column string can contain a formatting mark which is parsed according to format specifier.
sRowFmt
- with a row format specifier of sRowFmt (a defined style)java.lang.Exception
public WriteExcel.Area addRow(java.lang.String[] sRows) throws java.lang.Exception
Each column string can contain a formatting mark which is parsed according to format specifier.
java.lang.Exception
public WriteExcel.Area addRow(java.lang.String[] sRows, int nStripe) throws java.lang.Exception
Each column string can contain a formatting mark which is parsed according to format specifier.
nStripe
- Stripe option. 0 - no stripe, odd number - #odd background, Even number - #evn backgroundjava.lang.Exception
public WriteExcel.Area addRow(java.lang.String[] sRows, java.lang.String sRowFmt) throws java.lang.Exception
Each column string can contain a formatting mark which is parsed according to format specifier.
sRowFmt
- with a row format specifier of sRowFmt (a defined style)java.lang.Exception
public WriteExcel.Area colWidth(int n1stCol, int nLastCol, int nChars) throws java.lang.Exception
This should be called after writeArea
is called. It sets the specifed inclusive range of columns
(0 basde within Area) to the
nChars width.
java.lang.Exception
public WriteExcel.Area colWidth(int nCol, int nChars) throws java.lang.Exception
This should be called after writeArea
is called. It sets the specifed column (0 based within Area) to the
nChars width.
java.lang.Exception
public int getAbsRow()
public int getBaseCol()
createArea
method call that created the areapublic int getBaseRow()
createArea
method call that created the areapublic int getDataRow()
public int getHdrCount()
header
method callspublic int getRowCount()
addRow
method callspublic java.util.ArrayList<java.lang.String[]> getRows() throws java.lang.Exception
java.lang.Exception
public java.lang.String getSheet()
createArea
method call that created the area.public WriteExcel getWriter()
public WriteExcel.Area header(java.lang.String sCols) throws java.lang.Exception
The string sCols is split using the '/' character and then each column is stored as a value after storing any formatting or merge marks parsed according to format specifier.
sCols
- The array of columns, each separated by the '/' character,java.lang.Exception
public WriteExcel.Area header(java.lang.String sCols, java.lang.String sHdrFmt) throws java.lang.Exception
The string sCols is split using the '/' character and then each column is stored as a value after storing any formatting or merge marks parsed according to format specifier.
sCols
- The array of columns, each separated by the '/' character,sHdrFmt
- The name of a defined style.java.lang.Exception
public WriteExcel.Area writeArea() throws java.lang.Exception
After the cells are written, size calculations are performed on each column based on the data.
java.lang.Exception
public WriteExcel.Area zapColText(int nRow, int nCol, java.lang.String sText) throws java.lang.Exception
This should be called before writeArea
is called. It changes the column text for the nRow and nCol within the Area (both 0 based).
The text can have a format specification parsed according to format specifier.
java.lang.Exception
public WriteExcel.Area zapHdrFmt(int nHdr, int nCol, java.lang.String sFmt) throws java.lang.Exception
This should be called before writeArea
is called. It changes the header format specifier for the nHdr and nCol within the Area (both 0 based).
java.lang.Exception
public WriteExcel.Area zapHdrText(int nHdr, int nCol, java.lang.String sText) throws java.lang.Exception
This should be called before writeArea
is called. It changes the header value for the nHdr and nCol within the Area (both 0 based).
java.lang.Exception