public class BookPivotRange
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short |
areaAll |
static short |
areaBlankColumnHeader |
static short |
areaData |
static short |
areaHeaders |
static short |
areaTopLeft |
static short |
column |
static short |
data |
static short |
page |
static short |
row |
Modifier and Type | Method and Description |
---|---|
void |
addCalcField(java.lang.String name,
java.lang.String formula)
add a calculated item to the data area
|
BookPivotField |
addField(java.lang.String name,
BookPivotArea area)
Returns the Field with the specified name.
|
BookPivotArea |
getArea(short area)
Returns the Area object associated with the specified area value.
|
java.lang.String |
getDataCaption()
return the data caption
|
java.lang.String |
getErrorCaption()
return the error caption
|
BookPivotField |
getField(int i)
Returns the Field located at the specified index.
|
BookPivotField |
getField(java.lang.String name)
Deprecated.
replaced by BookPivotRange.addField
|
int |
getFieldCount()
Returns the number of Fields in the PivotRange.
|
java.lang.String |
getMissingCaption()
return the null value caption
|
RangeArea |
getRangeArea()
returns the boundary of the PivotRange
|
boolean |
isCompact()
indicates if it is compact
|
boolean |
isInGridZone()
indicates if the grid zone is set
|
boolean |
isShowColGrandTotal()
Indicates if the col grand total is shown or not
|
boolean |
isShowDrill()
indicate if drill is set or not
|
boolean |
isShowHeader()
indicate if the header is shown or not
|
boolean |
isShowRowGrandTotal()
Indicates if the row grand total is shown or not
|
void |
refresh()
refresh the selected pivot range
|
void |
refreshRange()
refresh the pivot table from the data source
|
void |
setCompact(boolean in)
the compact flag is set if true
|
void |
setConditionalFormat(ConditionFormat conditionFormat,
int dataFiled,
int selection)
apply the conditional formatting to the pivot table
|
void |
setDataCaption(java.lang.String caption)
set the data caption
|
void |
setDataOnRow(boolean onRow)
set the data field in the column area if flag is false.
|
void |
setErrorCaption(boolean bUse,
java.lang.String caption)
set the error caption
|
void |
setInGridZone(boolean in)
the grid zone is set if true
|
void |
setMissingCaption(boolean bUse,
java.lang.String caption)
set the caption for the null values
|
void |
setShowColGrandTotal(boolean total)
set the col grand total is shown if true
|
void |
setShowDrill(boolean in)
the drill flag is set if true
|
void |
setShowHeader(boolean in)
header is shown if true
|
void |
setShowRowGrandTotal(boolean total)
set the row grand total is shown if true
|
void |
setTableCustomStyle(java.lang.String style)
apply the custom table style to the pivot table,the style must be exist in the workbook
|
void |
setTableFormat(RangeStyle rs,
int selection)
format the selection part of the pivot table
|
void |
setTableStyle(PivotBuiltInStyles style) |
public static final short row
public static final short column
public static final short page
public static final short areaBlankColumnHeader
public static final short areaData
public static final short areaAll
public static final short areaTopLeft
public static final short areaHeaders
public static final short data
public void refreshRange()
public BookPivotArea getArea(short area)
area
- Area valurpublic BookPivotField getField(java.lang.String name)
name
- Name of the desired Field.public void addCalcField(java.lang.String name, java.lang.String formula)
name
- Name of the desired Field.formula
- calculated field formulapublic BookPivotField addField(java.lang.String name, BookPivotArea area)
name
- Name of the desired Field.area
- pivot areapublic BookPivotField getField(int i)
i
- Index to the desired Field.public int getFieldCount()
public RangeArea getRangeArea()
public void setDataOnRow(boolean onRow)
onRow
- true to set field in row area.public void refresh() throws java.lang.Exception
java.lang.Exception
- if error occurpublic boolean isShowRowGrandTotal()
public void setShowRowGrandTotal(boolean total)
total
- true to set row grand totalpublic boolean isShowColGrandTotal()
public void setShowColGrandTotal(boolean total)
total
- true to set col grand totalpublic boolean isCompact()
public void setCompact(boolean in)
in
- true to set compactpublic boolean isInGridZone()
public void setInGridZone(boolean in)
in
- true to set grid zonepublic boolean isShowDrill()
public void setShowDrill(boolean in)
in
- true to set the drill flagpublic boolean isShowHeader()
public void setShowHeader(boolean in)
in
- true to show headerpublic java.lang.String getDataCaption()
public void setDataCaption(java.lang.String caption)
caption
- data captionpublic java.lang.String getErrorCaption()
public void setErrorCaption(boolean bUse, java.lang.String caption)
bUse
- true to use error captioncaption
- lable stringpublic java.lang.String getMissingCaption()
public void setMissingCaption(boolean bUse, java.lang.String caption)
bUse
- true to use missing captioncaption
- lable stringpublic void setTableStyle(PivotBuiltInStyles style)
style
- build-in stylePivotBuiltInStyles
public void setTableCustomStyle(java.lang.String style)
style
- style namepublic void setTableFormat(RangeStyle rs, int selection)
rs
- formatting objectselection
- part of the pivot table
0-BlankColumnHeader
2-Data
3-all
4-TopLeftpublic void setConditionalFormat(ConditionFormat conditionFormat, int dataFiled, int selection)
conditionFormat
- conditional formattingdataFiled
- data field indexselection
- conditional type to be applied
0 - Selected cells
1 - All cells showing "#DATAFIELD" values
2 - All cells showing "#DATAFIELD" values for "#ROW_AREA_FIELDS" and "#COL_AREA_FIELDS"