org.zkoss.zss.model.impl
Class BookHelper
java.lang.Object
org.zkoss.zss.model.impl.BookHelper
public final class BookHelper
- extends java.lang.Object
Internal User only. Helper class to handle the two version of Books.
- Author:
- henrichen
|
Method Summary |
static void |
assignCell(org.zkoss.poi.xssf.usermodel.XSSFCell srcCell,
org.zkoss.poi.xssf.usermodel.XSSFCell dstCell)
|
static void |
assignChangeInfo(java.util.Set<Ref> toEval,
java.util.Set<Ref> affected,
java.util.List<MergeChange> mergeChanges,
ChangeInfo changeInfo0)
|
static void |
assignRefs(java.util.Set<Ref> toEval,
java.util.Set<Ref> affected,
java.util.Set<Ref>[] refs)
|
static java.lang.String |
awtColorToHTMLColor(java.awt.Color color)
|
static java.util.Set<Ref>[] |
clearCell(Worksheet sheet,
int rowIndex,
int colIndex)
|
static void |
clearFormulaCache(org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.String |
colorToHTML(org.zkoss.poi.ss.usermodel.Workbook book,
org.zkoss.poi.ss.usermodel.Color color)
|
static ChangeInfo |
copyCell(org.zkoss.poi.ss.usermodel.Cell srcCell,
Worksheet sheet,
int rowIndex,
int colIndex,
int pasteType,
int pasteOp,
boolean transpose)
|
static ChangeInfo |
deleteColumns(Worksheet sheet,
int startCol,
int num)
|
static ChangeInfo |
deleteHSSFColumns(Worksheet sheet,
int startCol,
int num)
|
static ChangeInfo |
deleteRange(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
boolean horizontal)
|
static ChangeInfo |
deleteRows(Worksheet sheet,
int startRow,
int num)
|
static ChangeInfo |
deleteXSSFColumns(Worksheet sheet,
int startCol,
int num)
|
static java.lang.Object[] |
editTextToValue(java.lang.String txt,
org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.Object[] |
editTextToValue(java.lang.String txt,
java.lang.String formatStr)
|
static org.zkoss.poi.ss.usermodel.CellValue |
evaluate(Book book,
org.zkoss.poi.ss.usermodel.Cell cell)
|
static ChangeInfo |
fill(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
|
static ChangeInfo |
fillDown(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
|
static ChangeInfo |
fillLeft(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
|
static ChangeInfo |
fillRight(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
|
static ChangeInfo |
fillUp(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
|
org.zkoss.poi.ss.usermodel.CellStyle |
findCellStyle(Book book,
short dataFormat,
short fontIndex,
boolean hidden,
boolean locked,
short alignment,
boolean wrapText,
short valign,
short rotation,
short indention,
short borderLeft,
short borderTop,
short borderRight,
short borderBottom,
short borderLeftColor,
short borderTopColor,
short borderRightColor,
short borderBottomColor,
short fillPattern,
short fillBackColor,
short fillForeColor)
|
static java.lang.String |
formatHyperlink(Book book,
int type,
java.lang.String address,
java.lang.String label)
|
static java.lang.String |
formatRichText(Book book,
org.zkoss.poi.ss.usermodel.RichTextString rstr,
java.util.List<int[]> indexes)
|
static Book |
getBook(Book book,
RefSheet refSheet)
|
static Book |
getBook(Book book,
java.lang.String bookname)
|
static Book |
getBook(Worksheet sheet,
RefSheet refSheet)
|
static BookSeries |
getBooks(Book book)
|
static org.zkoss.poi.ss.usermodel.Cell |
getCell(Worksheet sheet,
int rowIndex,
int colIndex)
|
static org.zkoss.poi.ss.formula.ptg.Ptg[] |
getCellPtgs(org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.String |
getCellText(org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.Object |
getCellValue(org.zkoss.poi.ss.usermodel.Cell cell)
|
static int |
getColumnFreeze(Worksheet sheet)
|
static org.zkoss.poi.ss.usermodel.DataValidation |
getDataValidationByCell(org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.String |
getEditText(org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.Object |
getEvalCellValue(org.zkoss.poi.ss.usermodel.Cell cell)
|
static org.zkoss.poi.ss.usermodel.Font |
getFont(org.zkoss.poi.ss.usermodel.Cell cell)
|
static org.zkoss.poi.ss.usermodel.Color |
getFontColor(org.zkoss.poi.ss.usermodel.Workbook book,
org.zkoss.poi.ss.usermodel.Font font)
|
static java.lang.String |
getFontCSSStyle(Book book,
org.zkoss.poi.ss.usermodel.Font font)
|
static java.lang.String |
getFontCSSStyle(org.zkoss.poi.ss.usermodel.Cell cell,
org.zkoss.poi.ss.usermodel.Font font)
|
static java.lang.String |
getFontHTMLColor(Book book,
org.zkoss.poi.ss.usermodel.Font font)
|
static java.lang.String |
getFontHTMLColor(org.zkoss.poi.ss.usermodel.Cell cell,
org.zkoss.poi.ss.usermodel.Font font)
|
static FormatTextImpl |
getFormatText(org.zkoss.poi.ss.usermodel.Cell cell)
|
static org.zkoss.xel.FunctionMapper |
getFunctionMapper(Book book)
|
static org.zkoss.poi.ss.usermodel.Hyperlink |
getHyperlink(org.zkoss.poi.ss.usermodel.Cell cell)
|
static org.zkoss.poi.ss.util.CellRangeAddress |
getMergeRegion(Worksheet sheet,
int row,
int col)
|
static org.zkoss.poi.ss.usermodel.Cell |
getOrCreateCell(Worksheet sheet,
int rowIndex,
int colIndex)
|
static org.zkoss.poi.ss.usermodel.FilterColumn |
getOrCreateFilterColumn(org.zkoss.poi.ss.usermodel.AutoFilter af,
int colId)
|
static org.zkoss.poi.ss.usermodel.Font |
getOrCreateFont(Book book,
short boldWeight,
org.zkoss.poi.ss.usermodel.Color color,
short fontHeight,
java.lang.String name,
boolean italic,
boolean strikeout,
short typeOffset,
byte underline)
|
static RefBook |
getOrCreateRefBook(Book book)
|
static org.zkoss.poi.ss.usermodel.Row |
getOrCreateRow(Worksheet sheet,
int rowIndex)
|
static int |
getRealAlignment(org.zkoss.poi.ss.usermodel.Cell cell)
|
static RefBook |
getRefBook(Book book)
|
static RefSheet |
getRefSheet(Book book,
Worksheet sheet)
|
static org.zkoss.poi.ss.usermodel.RichTextString |
getRichEditText(org.zkoss.poi.ss.usermodel.Cell cell)
|
static int |
getRowFreeze(Worksheet sheet)
|
static short |
getRowHeight(Worksheet sheet,
int row)
|
static Worksheet |
getSheet(Book book,
RefSheet refSheet)
|
static Worksheet |
getSheet(Worksheet sheet,
RefSheet refSheet)
|
static org.zkoss.poi.ss.usermodel.RichTextString |
getText(org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.String |
getTextCSSStyle(Book book,
org.zkoss.poi.ss.usermodel.Cell cell)
|
static java.lang.String[] |
getValidationList(Worksheet sheet,
org.zkoss.poi.ss.usermodel.DataValidation validation)
|
static java.lang.Object |
getValueByCellValue(org.zkoss.poi.ss.usermodel.CellValue cellValue)
|
static org.zkoss.xel.VariableResolver |
getVariableResolver(Book book)
|
static org.zkoss.poi.ss.usermodel.Color |
HTMLToColor(org.zkoss.poi.ss.usermodel.Workbook book,
java.lang.String color)
|
static ChangeInfo |
insertColumns(Worksheet sheet,
int startCol,
int num,
int copyOrigin)
|
static ChangeInfo |
insertRange(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
boolean horizontal,
int copyRightBelow)
|
static ChangeInfo |
insertRows(Worksheet sheet,
int startRow,
int num,
int copyOrigin)
|
static boolean |
isBlankCell(org.zkoss.poi.ss.usermodel.Cell cell)
|
static boolean |
isFreezePane(Worksheet sheet)
|
static boolean |
isOneCell(Worksheet sheet,
org.zkoss.poi.ss.util.CellRangeAddress rng)
|
static ChangeInfo |
merge(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
boolean across)
|
static ChangeInfo |
moveRange(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
int nRow,
int nCol)
|
static void |
notifyBtnChanges(java.util.Set<Ref> all)
|
static void |
notifyCellChanges(Book book,
java.util.Set<Ref> all)
|
static void |
notifyChartAdd(Ref ref,
org.zkoss.poi.ss.usermodel.ZssChartX chartX)
|
static void |
notifyChartDelete(Ref ref,
org.zkoss.poi.ss.usermodel.Chart chart)
|
static void |
notifyChartUpdate(Ref ref,
org.zkoss.poi.ss.usermodel.Chart chart)
|
static void |
notifyPictureAdd(Ref ref,
org.zkoss.poi.ss.usermodel.Picture picture)
|
static void |
notifyPictureDelete(Ref ref,
org.zkoss.poi.ss.usermodel.Picture picture)
|
static void |
notifyPictureUpdate(Ref ref,
org.zkoss.poi.ss.usermodel.Picture picture)
|
static void |
notifySizeChanges(Book book,
java.util.Set<Ref> all)
|
static void |
notifyWidgetChanges(java.util.Set<Ref> all)
|
static java.lang.Object[] |
parseToDate(java.lang.String txt)
|
static void |
reevaluateAndNotify(Book book,
java.util.Set<Ref> last,
java.util.Set<Ref> all)
|
static java.util.Set<Ref>[] |
removeCell(Worksheet sheet,
int rowIndex,
int colIndex)
|
static void |
removeDataValidtionOfRange(Range range)
|
static short |
rgbToIndex(Book book,
java.lang.String color)
|
static void |
setBooks(Book book,
BookSeries books)
|
static java.util.Set<Ref> |
setBorders(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
short borderIndex,
org.zkoss.poi.ss.usermodel.BorderStyle lineStyle,
java.lang.String color)
|
static void |
setBottomBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
|
static java.util.Set<Ref>[] |
setCellErrorValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.Byte value)
|
static java.util.Set<Ref>[] |
setCellFormula(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.String value)
|
static java.util.Set<Ref>[] |
setCellHyperlink(org.zkoss.poi.ss.usermodel.Cell cell,
int linkTarget,
java.lang.String address)
|
static java.util.Set<Ref> |
setCellStyle(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
org.zkoss.poi.ss.usermodel.CellStyle style)
|
static java.util.Set<Ref>[] |
setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.Boolean value)
|
static java.util.Set<Ref>[] |
setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.util.Date value)
|
static java.util.Set<Ref>[] |
setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.Number value)
|
static java.util.Set<Ref>[] |
setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
org.zkoss.poi.ss.usermodel.RichTextString value)
|
static java.util.Set<Ref>[] |
setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.String value)
|
static java.util.Set<Ref> |
setColumnsHidden(Worksheet sheet,
int lCol,
int rCol,
boolean hidden)
|
static java.util.Set<Ref> |
setColumnWidth(Worksheet sheet,
int lCol,
int rCol,
int char256)
|
static void |
setDataValidationToRange(Range range,
Range ref)
|
static void |
setDataValidationToRange(Range range,
java.lang.String[] list)
|
static void |
setFillForegroundColor(org.zkoss.poi.ss.usermodel.CellStyle newCellStyle,
org.zkoss.poi.ss.usermodel.Color xlsColor)
|
static void |
setLeftBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
|
static void |
setProperties(org.zkoss.poi.ss.usermodel.FilterColumn fc,
java.lang.Object criteria1,
int filterOp,
java.lang.Object criteria2,
java.lang.Boolean visibleDropDown)
|
static void |
setRightBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
|
static java.util.Set<Ref> |
setRowHeight(Worksheet sheet,
int tRow,
int bRow,
short twips,
boolean customHeight)
|
static void |
setRowHeight(Worksheet sheet,
int row,
short twips,
boolean customHeight)
|
static java.util.Set<Ref> |
setRowsHidden(Worksheet sheet,
int tRow,
int bRow,
boolean hidden)
|
static void |
setTopBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
|
static java.util.List<org.zkoss.poi.ss.util.CellRangeAddress[]> |
shiftBothMergedRegion(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
int nRow,
int nCol)
|
static ChangeInfo |
sort(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
Ref key1,
boolean desc1,
Ref key2,
int type,
boolean desc2,
Ref key3,
boolean desc3,
int header,
int orderCustom,
boolean matchCase,
boolean sortByRows,
int sortMethod,
int dataOption1,
int dataOption2,
int dataOption3)
|
static java.lang.String |
toHex(int num)
|
static ChangeInfo |
unMerge(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTO_COLOR
public static final java.lang.String AUTO_COLOR
- See Also:
- Constant Field Values
BORDER_EDGE_BOTTOM
public static final short BORDER_EDGE_BOTTOM
- See Also:
- Constant Field Values
BORDER_EDGE_RIGHT
public static final short BORDER_EDGE_RIGHT
- See Also:
- Constant Field Values
BORDER_EDGE_TOP
public static final short BORDER_EDGE_TOP
- See Also:
- Constant Field Values
BORDER_EDGE_LEFT
public static final short BORDER_EDGE_LEFT
- See Also:
- Constant Field Values
BORDER_INSIDE_HORIZONTAL
public static final short BORDER_INSIDE_HORIZONTAL
- See Also:
- Constant Field Values
BORDER_INSIDE_VERTICAL
public static final short BORDER_INSIDE_VERTICAL
- See Also:
- Constant Field Values
BORDER_DIAGONAL_DOWN
public static final short BORDER_DIAGONAL_DOWN
- See Also:
- Constant Field Values
BORDER_DIAGONAL_UP
public static final short BORDER_DIAGONAL_UP
- See Also:
- Constant Field Values
BORDER_FULL
public static final short BORDER_FULL
- See Also:
- Constant Field Values
BORDER_OUTLINE
public static final short BORDER_OUTLINE
- See Also:
- Constant Field Values
BORDER_INSIDE
public static final short BORDER_INSIDE
- See Also:
- Constant Field Values
BORDER_DIAGONAL
public static final short BORDER_DIAGONAL
- See Also:
- Constant Field Values
SORT_NORMAL_DEFAULT
public static final int SORT_NORMAL_DEFAULT
- See Also:
- Constant Field Values
SORT_TEXT_AS_NUMBERS
public static final int SORT_TEXT_AS_NUMBERS
- See Also:
- Constant Field Values
SORT_HEADER_NO
public static final int SORT_HEADER_NO
- See Also:
- Constant Field Values
SORT_HEADER_YES
public static final int SORT_HEADER_YES
- See Also:
- Constant Field Values
INNERPASTE_NUMBER_FORMATS
public static final int INNERPASTE_NUMBER_FORMATS
- See Also:
- Constant Field Values
INNERPASTE_BORDERS
public static final int INNERPASTE_BORDERS
- See Also:
- Constant Field Values
INNERPASTE_OTHER_FORMATS
public static final int INNERPASTE_OTHER_FORMATS
- See Also:
- Constant Field Values
INNERPASTE_VALUES
public static final int INNERPASTE_VALUES
- See Also:
- Constant Field Values
INNERPASTE_FORMULAS
public static final int INNERPASTE_FORMULAS
- See Also:
- Constant Field Values
INNERPASTE_VALUES_AND_FORMULAS
public static final int INNERPASTE_VALUES_AND_FORMULAS
- See Also:
- Constant Field Values
INNERPASTE_COMMENTS
public static final int INNERPASTE_COMMENTS
- See Also:
- Constant Field Values
INNERPASTE_VALIDATION
public static final int INNERPASTE_VALIDATION
- See Also:
- Constant Field Values
INNERPASTE_COLUMN_WIDTHS
public static final int INNERPASTE_COLUMN_WIDTHS
- See Also:
- Constant Field Values
INNERPASTE_FORMATS
public static final int INNERPASTE_FORMATS
- See Also:
- Constant Field Values
PASTEOP_ADD
public static final int PASTEOP_ADD
- See Also:
- Constant Field Values
PASTEOP_SUB
public static final int PASTEOP_SUB
- See Also:
- Constant Field Values
PASTEOP_MUL
public static final int PASTEOP_MUL
- See Also:
- Constant Field Values
PASTEOP_DIV
public static final int PASTEOP_DIV
- See Also:
- Constant Field Values
PASTEOP_NONE
public static final int PASTEOP_NONE
- See Also:
- Constant Field Values
FILL_DEFAULT
public static final int FILL_DEFAULT
- See Also:
- Constant Field Values
FILL_FORMATS
public static final int FILL_FORMATS
- See Also:
- Constant Field Values
FILL_VALUES
public static final int FILL_VALUES
- See Also:
- Constant Field Values
FILL_COPY
public static final int FILL_COPY
- See Also:
- Constant Field Values
FILL_DAYS
public static final int FILL_DAYS
- See Also:
- Constant Field Values
FILL_WEEKDAYS
public static final int FILL_WEEKDAYS
- See Also:
- Constant Field Values
FILL_MONTHS
public static final int FILL_MONTHS
- See Also:
- Constant Field Values
FILL_YEARS
public static final int FILL_YEARS
- See Also:
- Constant Field Values
FILL_HOURS
public static final int FILL_HOURS
- See Also:
- Constant Field Values
FILL_GROWTH_TREND
public static final int FILL_GROWTH_TREND
- See Also:
- Constant Field Values
FILL_LINER_TREND
public static final int FILL_LINER_TREND
- See Also:
- Constant Field Values
FILL_SERIES
public static final int FILL_SERIES
- See Also:
- Constant Field Values
BookHelper
public BookHelper()
getRefBook
public static RefBook getRefBook(Book book)
getOrCreateRefBook
public static RefBook getOrCreateRefBook(Book book)
getRefSheet
public static RefSheet getRefSheet(Book book,
Worksheet sheet)
getBooks
public static BookSeries getBooks(Book book)
setBooks
public static void setBooks(Book book,
BookSeries books)
getBook
public static Book getBook(Book book,
java.lang.String bookname)
getBook
public static Book getBook(Book book,
RefSheet refSheet)
getBook
public static Book getBook(Worksheet sheet,
RefSheet refSheet)
getSheet
public static Worksheet getSheet(Worksheet sheet,
RefSheet refSheet)
getSheet
public static Worksheet getSheet(Book book,
RefSheet refSheet)
getVariableResolver
public static org.zkoss.xel.VariableResolver getVariableResolver(Book book)
getFunctionMapper
public static org.zkoss.xel.FunctionMapper getFunctionMapper(Book book)
clearFormulaCache
public static void clearFormulaCache(org.zkoss.poi.ss.usermodel.Cell cell)
notifyCellChanges
public static void notifyCellChanges(Book book,
java.util.Set<Ref> all)
notifySizeChanges
public static void notifySizeChanges(Book book,
java.util.Set<Ref> all)
notifyWidgetChanges
public static void notifyWidgetChanges(java.util.Set<Ref> all)
notifyChartAdd
public static void notifyChartAdd(Ref ref,
org.zkoss.poi.ss.usermodel.ZssChartX chartX)
notifyChartDelete
public static void notifyChartDelete(Ref ref,
org.zkoss.poi.ss.usermodel.Chart chart)
notifyPictureAdd
public static void notifyPictureAdd(Ref ref,
org.zkoss.poi.ss.usermodel.Picture picture)
notifyPictureDelete
public static void notifyPictureDelete(Ref ref,
org.zkoss.poi.ss.usermodel.Picture picture)
notifyPictureUpdate
public static void notifyPictureUpdate(Ref ref,
org.zkoss.poi.ss.usermodel.Picture picture)
notifyChartUpdate
public static void notifyChartUpdate(Ref ref,
org.zkoss.poi.ss.usermodel.Chart chart)
notifyBtnChanges
public static void notifyBtnChanges(java.util.Set<Ref> all)
reevaluateAndNotify
public static void reevaluateAndNotify(Book book,
java.util.Set<Ref> last,
java.util.Set<Ref> all)
evaluate
public static org.zkoss.poi.ss.usermodel.CellValue evaluate(Book book,
org.zkoss.poi.ss.usermodel.Cell cell)
getCell
public static org.zkoss.poi.ss.usermodel.Cell getCell(Worksheet sheet,
int rowIndex,
int colIndex)
getOrCreateCell
public static org.zkoss.poi.ss.usermodel.Cell getOrCreateCell(Worksheet sheet,
int rowIndex,
int colIndex)
formatHyperlink
public static java.lang.String formatHyperlink(Book book,
int type,
java.lang.String address,
java.lang.String label)
formatRichText
public static java.lang.String formatRichText(Book book,
org.zkoss.poi.ss.usermodel.RichTextString rstr,
java.util.List<int[]> indexes)
getTextCSSStyle
public static java.lang.String getTextCSSStyle(Book book,
org.zkoss.poi.ss.usermodel.Cell cell)
awtColorToHTMLColor
public static java.lang.String awtColorToHTMLColor(java.awt.Color color)
getRealAlignment
public static int getRealAlignment(org.zkoss.poi.ss.usermodel.Cell cell)
getFontCSSStyle
public static java.lang.String getFontCSSStyle(org.zkoss.poi.ss.usermodel.Cell cell,
org.zkoss.poi.ss.usermodel.Font font)
getFontCSSStyle
public static java.lang.String getFontCSSStyle(Book book,
org.zkoss.poi.ss.usermodel.Font font)
getFontHTMLColor
public static java.lang.String getFontHTMLColor(Book book,
org.zkoss.poi.ss.usermodel.Font font)
getFontHTMLColor
public static java.lang.String getFontHTMLColor(org.zkoss.poi.ss.usermodel.Cell cell,
org.zkoss.poi.ss.usermodel.Font font)
colorToHTML
public static java.lang.String colorToHTML(org.zkoss.poi.ss.usermodel.Workbook book,
org.zkoss.poi.ss.usermodel.Color color)
rgbToIndex
public static short rgbToIndex(Book book,
java.lang.String color)
toHex
public static java.lang.String toHex(int num)
getHyperlink
public static org.zkoss.poi.ss.usermodel.Hyperlink getHyperlink(org.zkoss.poi.ss.usermodel.Cell cell)
getText
public static org.zkoss.poi.ss.usermodel.RichTextString getText(org.zkoss.poi.ss.usermodel.Cell cell)
getFormatText
public static FormatTextImpl getFormatText(org.zkoss.poi.ss.usermodel.Cell cell)
getCellText
public static java.lang.String getCellText(org.zkoss.poi.ss.usermodel.Cell cell)
getValueByCellValue
public static java.lang.Object getValueByCellValue(org.zkoss.poi.ss.usermodel.CellValue cellValue)
getEditText
public static java.lang.String getEditText(org.zkoss.poi.ss.usermodel.Cell cell)
getRichEditText
public static org.zkoss.poi.ss.usermodel.RichTextString getRichEditText(org.zkoss.poi.ss.usermodel.Cell cell)
getEvalCellValue
public static java.lang.Object getEvalCellValue(org.zkoss.poi.ss.usermodel.Cell cell)
getCellValue
public static java.lang.Object getCellValue(org.zkoss.poi.ss.usermodel.Cell cell)
removeCell
public static java.util.Set<Ref>[] removeCell(Worksheet sheet,
int rowIndex,
int colIndex)
clearCell
public static java.util.Set<Ref>[] clearCell(Worksheet sheet,
int rowIndex,
int colIndex)
setCellValue
public static java.util.Set<Ref>[] setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.Number value)
setCellValue
public static java.util.Set<Ref>[] setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.Boolean value)
setCellErrorValue
public static java.util.Set<Ref>[] setCellErrorValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.Byte value)
setCellValue
public static java.util.Set<Ref>[] setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.util.Date value)
setCellFormula
public static java.util.Set<Ref>[] setCellFormula(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.String value)
setCellHyperlink
public static java.util.Set<Ref>[] setCellHyperlink(org.zkoss.poi.ss.usermodel.Cell cell,
int linkTarget,
java.lang.String address)
setCellValue
public static java.util.Set<Ref>[] setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
java.lang.String value)
setCellValue
public static java.util.Set<Ref>[] setCellValue(org.zkoss.poi.ss.usermodel.Cell cell,
org.zkoss.poi.ss.usermodel.RichTextString value)
editTextToValue
public static java.lang.Object[] editTextToValue(java.lang.String txt,
org.zkoss.poi.ss.usermodel.Cell cell)
editTextToValue
public static java.lang.Object[] editTextToValue(java.lang.String txt,
java.lang.String formatStr)
- Parameters:
txt - the text to be inputformatStr - the cell text format
- Returns:
- object array with the value type in 0(an Integer),
the value in 1(an Object), and the date format in 2(a String if parse as a date)
parseToDate
public static java.lang.Object[] parseToDate(java.lang.String txt)
getOrCreateRow
public static org.zkoss.poi.ss.usermodel.Row getOrCreateRow(Worksheet sheet,
int rowIndex)
copyCell
public static ChangeInfo copyCell(org.zkoss.poi.ss.usermodel.Cell srcCell,
Worksheet sheet,
int rowIndex,
int colIndex,
int pasteType,
int pasteOp,
boolean transpose)
assignRefs
public static void assignRefs(java.util.Set<Ref> toEval,
java.util.Set<Ref> affected,
java.util.Set<Ref>[] refs)
assignChangeInfo
public static void assignChangeInfo(java.util.Set<Ref> toEval,
java.util.Set<Ref> affected,
java.util.List<MergeChange> mergeChanges,
ChangeInfo changeInfo0)
getCellPtgs
public static org.zkoss.poi.ss.formula.ptg.Ptg[] getCellPtgs(org.zkoss.poi.ss.usermodel.Cell cell)
findCellStyle
public org.zkoss.poi.ss.usermodel.CellStyle findCellStyle(Book book,
short dataFormat,
short fontIndex,
boolean hidden,
boolean locked,
short alignment,
boolean wrapText,
short valign,
short rotation,
short indention,
short borderLeft,
short borderTop,
short borderRight,
short borderBottom,
short borderLeftColor,
short borderTopColor,
short borderRightColor,
short borderBottomColor,
short fillPattern,
short fillBackColor,
short fillForeColor)
insertRows
public static ChangeInfo insertRows(Worksheet sheet,
int startRow,
int num,
int copyOrigin)
deleteRows
public static ChangeInfo deleteRows(Worksheet sheet,
int startRow,
int num)
insertColumns
public static ChangeInfo insertColumns(Worksheet sheet,
int startCol,
int num,
int copyOrigin)
deleteColumns
public static ChangeInfo deleteColumns(Worksheet sheet,
int startCol,
int num)
deleteHSSFColumns
public static ChangeInfo deleteHSSFColumns(Worksheet sheet,
int startCol,
int num)
deleteXSSFColumns
public static ChangeInfo deleteXSSFColumns(Worksheet sheet,
int startCol,
int num)
insertRange
public static ChangeInfo insertRange(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
boolean horizontal,
int copyRightBelow)
deleteRange
public static ChangeInfo deleteRange(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
boolean horizontal)
moveRange
public static ChangeInfo moveRange(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
int nRow,
int nCol)
unMerge
public static ChangeInfo unMerge(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol)
merge
public static ChangeInfo merge(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
boolean across)
sort
public static ChangeInfo sort(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
Ref key1,
boolean desc1,
Ref key2,
int type,
boolean desc2,
Ref key3,
boolean desc3,
int header,
int orderCustom,
boolean matchCase,
boolean sortByRows,
int sortMethod,
int dataOption1,
int dataOption2,
int dataOption3)
getOrCreateFont
public static org.zkoss.poi.ss.usermodel.Font getOrCreateFont(Book book,
short boldWeight,
org.zkoss.poi.ss.usermodel.Color color,
short fontHeight,
java.lang.String name,
boolean italic,
boolean strikeout,
short typeOffset,
byte underline)
getFont
public static org.zkoss.poi.ss.usermodel.Font getFont(org.zkoss.poi.ss.usermodel.Cell cell)
setBorders
public static java.util.Set<Ref> setBorders(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
short borderIndex,
org.zkoss.poi.ss.usermodel.BorderStyle lineStyle,
java.lang.String color)
setColumnWidth
public static java.util.Set<Ref> setColumnWidth(Worksheet sheet,
int lCol,
int rCol,
int char256)
setRowHeight
public static java.util.Set<Ref> setRowHeight(Worksheet sheet,
int tRow,
int bRow,
short twips,
boolean customHeight)
setRowHeight
public static void setRowHeight(Worksheet sheet,
int row,
short twips,
boolean customHeight)
getRowHeight
public static short getRowHeight(Worksheet sheet,
int row)
setCellStyle
public static java.util.Set<Ref> setCellStyle(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
org.zkoss.poi.ss.usermodel.CellStyle style)
fill
public static ChangeInfo fill(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
fillDown
public static ChangeInfo fillDown(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
fillUp
public static ChangeInfo fillUp(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
fillRight
public static ChangeInfo fillRight(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
fillLeft
public static ChangeInfo fillLeft(Worksheet sheet,
Ref srcRef,
Ref dstRef,
int fillType)
setRowsHidden
public static java.util.Set<Ref> setRowsHidden(Worksheet sheet,
int tRow,
int bRow,
boolean hidden)
setColumnsHidden
public static java.util.Set<Ref> setColumnsHidden(Worksheet sheet,
int lCol,
int rCol,
boolean hidden)
shiftBothMergedRegion
public static java.util.List<org.zkoss.poi.ss.util.CellRangeAddress[]> shiftBothMergedRegion(Worksheet sheet,
int tRow,
int lCol,
int bRow,
int rCol,
int nRow,
int nCol)
assignCell
public static void assignCell(org.zkoss.poi.xssf.usermodel.XSSFCell srcCell,
org.zkoss.poi.xssf.usermodel.XSSFCell dstCell)
setFillForegroundColor
public static void setFillForegroundColor(org.zkoss.poi.ss.usermodel.CellStyle newCellStyle,
org.zkoss.poi.ss.usermodel.Color xlsColor)
HTMLToColor
public static org.zkoss.poi.ss.usermodel.Color HTMLToColor(org.zkoss.poi.ss.usermodel.Workbook book,
java.lang.String color)
setLeftBorderColor
public static void setLeftBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
setRightBorderColor
public static void setRightBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
setTopBorderColor
public static void setTopBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
setBottomBorderColor
public static void setBottomBorderColor(org.zkoss.poi.ss.usermodel.CellStyle style,
org.zkoss.poi.ss.usermodel.Color color)
getFontColor
public static org.zkoss.poi.ss.usermodel.Color getFontColor(org.zkoss.poi.ss.usermodel.Workbook book,
org.zkoss.poi.ss.usermodel.Font font)
isFreezePane
public static boolean isFreezePane(Worksheet sheet)
getRowFreeze
public static int getRowFreeze(Worksheet sheet)
getColumnFreeze
public static int getColumnFreeze(Worksheet sheet)
getDataValidationByCell
public static org.zkoss.poi.ss.usermodel.DataValidation getDataValidationByCell(org.zkoss.poi.ss.usermodel.Cell cell)
setDataValidationToRange
public static void setDataValidationToRange(Range range,
java.lang.String[] list)
setDataValidationToRange
public static void setDataValidationToRange(Range range,
Range ref)
removeDataValidtionOfRange
public static void removeDataValidtionOfRange(Range range)
isBlankCell
public static boolean isBlankCell(org.zkoss.poi.ss.usermodel.Cell cell)
getOrCreateFilterColumn
public static org.zkoss.poi.ss.usermodel.FilterColumn getOrCreateFilterColumn(org.zkoss.poi.ss.usermodel.AutoFilter af,
int colId)
setProperties
public static void setProperties(org.zkoss.poi.ss.usermodel.FilterColumn fc,
java.lang.Object criteria1,
int filterOp,
java.lang.Object criteria2,
java.lang.Boolean visibleDropDown)
getMergeRegion
public static org.zkoss.poi.ss.util.CellRangeAddress getMergeRegion(Worksheet sheet,
int row,
int col)
isOneCell
public static boolean isOneCell(Worksheet sheet,
org.zkoss.poi.ss.util.CellRangeAddress rng)
getValidationList
public static java.lang.String[] getValidationList(Worksheet sheet,
org.zkoss.poi.ss.usermodel.DataValidation validation)
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.