|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
com.jxcell.View
public class View
This is the jxcell view class.
This is the primary class of jxcell. You may also use this class to create an instance of a workbook which is not visible, such as for use on a server.
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
View()
This constructor calls the other View constructor with a null View reference to create a new workbook. |
|
View(Book book1,
Group group)
|
|
View(java.util.Locale locale)
|
|
View(View view)
If the View argument is null, this constructor creates a new workbook, or if the View argument is not null, this constructor attaches to the specified view's workbook. |
Method Summary | |
---|---|
void |
addCancelEditListener(CancelEditListener canceleditlistener)
Adds the specified listener to receive CancelEdit events |
ChartShape |
addChart(double x1,
double y1,
double x2,
double y2)
Creates and adds a chart to the active worksheet. |
ChartShape |
addChartSheet(int sheetIndex)
Creates and adds a chart to the book and make it a chart sheet. |
void |
addColPageBreak(int rc)
Adds a vertical page break to the left edge of the specified column |
void |
addComment(int row1,
int col1,
java.lang.String text,
java.lang.String author)
add a comment to the cell in the current sheet |
void |
addEndCellModifyListener(CellModifyListener cellModifyListener)
|
void |
addEndEditListener(EndEditListener endeditlistener)
Adds the specified listener to receive EndEdit events |
void |
addEndRecalcListener(EndRecalcListener endrecalclistener)
Adds the specified listener to receive EndRecalc events |
void |
addHyperlink(int row1,
int col1,
int row2,
int col2,
java.lang.String url,
int type,
java.lang.String tooltip)
add the hyperlink to the specified sheet |
void |
addHyperlinkListener(HyperlinkListener hyperlinklistener)
|
void |
addModifiedListener(ModifiedListener modifiedlistener)
Adds the specified listener to receive Modified events |
GRObject |
addObject(short objectType,
double x1,
double y1,
double x2,
double y2)
Creates and adds an object to the active worksheet |
void |
addObjectListener(ObjectListener objectlistener)
Adds the specified listener to receive Object events |
void |
addPageBreak()
Adds a horizontal and vertical page break adjacent to the active cell The horizontal page break is added at the cell's top edge; the vertical page break is added at the cell's left edge. |
PictureShape |
addPicture(double x1,
double y1,
double x2,
double y2,
byte[] picData)
Adds a picture object to the worksheet |
GRObject |
addPicture(double x1,
double y1,
double x2,
double y2,
java.lang.String fileName)
Adds picture object to the worksheet |
void |
addPicture(java.io.InputStream fileinputstream)
|
void |
addRowPageBreak(int row)
Adds a horizontal page break adjacent to the top edge of the specified row |
void |
addSelection(GRObject grobject)
Selects an additional object. |
void |
addSelection(int row1,
int col1,
int row2,
int col2)
Adds a new selection to the current selection list Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
void |
addSelectionChangedListener(SelectionChangedListener selectionchangedlistener)
Adds the specified listener to receive SelectionChanged events |
void |
addStartCellModifyListener(CellModifyListener cellModifyListener)
|
void |
addStartEditListener(StartEditListener starteditlistener)
Adds the specified listener to receive StartEdit events |
void |
addStartRecalcListener(StartRecalcListener startrecalclistener)
Adds the specified listener to receive StartRecalc events |
void |
addUIListener(UIListener uilistener)
|
void |
addUpdateListener(UpdateListener updatelistener)
Adds the specified listener to receive Update events |
void |
addValidationFailedListener(ValidationFailedListener validationfailedlistener)
Adds the specified listener to receive ValidationFailed events |
void |
addViewChangedListener(ViewChangedListener viewchangedlistener)
Adds the specified listener to receive ViewChanged events |
void |
attach(Book book)
Attaches the current book to the specified Book using the display properties of the specified workbook. |
void |
autoFilter()
Creates an AutoFilter using this range to identify the bounds. |
void |
cancelEdit()
Aborts edit mode and leaves the current cell unchanged |
boolean |
canEditPaste()
|
boolean |
canEditPasteSpecial()
|
void |
chartSheet(ChartShape chart,
java.lang.String sheetName)
|
int |
charWidthToTwips(int nCharWidth)
Converts column widths to units equal to 1/256th of the character 0's width in the default font. |
void |
checkRecalc()
Recalculates the worksheet if needed |
void |
childIsActive()
Informs the View that a child of the view is or soon will be active. |
void |
clearCell(int row,
int col)
set cell value to empty,do nothing if cell is null |
void |
clearRange(int row1,
int col1,
int row2,
int col2,
short clearType)
Clears the specified range Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
java.lang.Object |
clone()
Returns a new View attached to the same workbook as this View. |
static int |
color2RGB(java.awt.Color color)
|
void |
copyAll(View view)
Copies the contents of one workbook to another workbook Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
void |
copyAllToBook(Book book)
Copies everything from the Book to dstBook. |
ChartShape |
copyChartTo(ChartShape chartShape,
int x1,
int y1,
int x2,
int y2)
this will copy chart shape and move to new location |
void |
copyDataFromArray(int sheet,
int row1,
int col1,
int row2,
int col2,
double[][] data)
Copies data from an array into a sheet The array and the sheet do not have to be the same size. |
void |
copyDataToArray(int sheet,
int row1,
int col1,
int row2,
int col2,
double[][] data)
Copies data from the sheet into an array The array and the sheet do not have to be the same size. |
void |
copyRange(int dstSheet,
int dstRow1,
int dstCol1,
int dstRow2,
int dstCol2,
View srcView,
int srcSheet,
int srcRow1,
int srcCol1,
int srcRow2,
int srcCol2)
Copies a range of cells to a new location in the current workbook Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
void |
copyRange(int dstSheet,
int dstRow1,
int dstCol1,
int dstRow2,
int dstCol2,
View srcView,
int srcSheet,
int srcRow1,
int srcCol1,
int srcRow2,
int srcCol2,
short what)
Copies a range of cells to a new location in the current workbook This method allows you to choose the type of data to copy: formulas only, values only, formats only, any combination of the previous types, or all of the types. |
void |
copyRange(int dstRow1,
int dstCol1,
int dstRow2,
int dstCol2,
View srcView,
int srcRow1,
int srcCol1,
int srcRow2,
int srcCol2)
Copies a range of cells to a new location in the current workbook The source range can be in a different workbook. |
void |
copyRange(int dstRow1,
int dstCol1,
int dstRow2,
int dstCol2,
View srcView,
int srcRow1,
int srcCol1,
int srcRow2,
int srcCol2,
short what)
Copies a range of cells to a new location in the current workbook The source range can be in a different workbook. |
void |
copySheet(int insertAt)
Creates copies of the selected sheet. |
void |
CopySheetFromBook(View m_SrcView,
int srcSheetIndex,
int destSheetIndex)
copy the sheet from specified Book View to specified sheet. |
ConditionFormat |
CreateConditionFormat()
Creates a new instance of a conditional format in current selected sheet. |
DataValidation |
CreateDataValidation()
Creates a new instance of a data validation object in current selected sheet. |
void |
deleteAutoFillItems(int index)
Deletes the specified autofill list Autofill lists are frequently used series of data, such as months and days of the week. |
void |
deleteDefinedName(java.lang.String name)
Deletes the specified user-defined name You cannot delete a defined name that is currently referenced by a formula in a cell, another defined name, or a chart object. |
void |
deleteRange(int row1,
int col1,
int row2,
int col2,
short shiftType)
Deletes cells, rows, or columns from the specified range in all selected sheets. |
void |
deleteSheets(int sheet,
int sheets)
Deletes one or more worksheets from a workbook The names displayed on the sheet tabs are not affected by deletions; however, the worksheet index is adjusted. |
void |
destroy()
Releases resources associated with this view. |
void |
draw(java.awt.Graphics g1,
int x,
int y,
int cx,
int cy,
int nRow,
int nCol,
int[] rows,
int[] cols,
int nFixedR1,
int nFixedRows,
int nFixedC1,
int nFixedCols)
Draws a workbook to the specified device context, such as a printer or window. |
void |
editClear(short clearType)
Clears all cells in the selected range and all selected objects in all selected sheets |
void |
editCopy()
Copies the selected range or objects to the clipboard Only one range can be selected. |
void |
editCopyDown()
Copies cells in the top row a selection to the other rows in the selected range and adjusts relative cell references appropriately |
void |
editCopyRight()
Copies cells in the left column of a selection to the other columns in the selected range and adjusts relative cell references appropriately |
void |
editCut()
Cuts the selected range or object to the clipboard and clears the range or object from the active worksheet. |
void |
editDelete(short shift)
Deletes the selected range in all selected sheets |
void |
editDeleteSheets()
Deletes the selected sheets Sheet names displayed on the tabs are not affect by the deletion; however, the remaining worksheet indexes are adjusted to reflect the new position. |
void |
editInsert(short shift)
Moves the selected range in all selected worksheets to insert new cells, rows, or columns |
void |
editInsertSheets()
Inserts one or more new worksheets, depending on the number and position of the currently selected worksheets. |
void |
editPaste()
Pastes the contents of the clipboard to the selected range. |
void |
editPaste(short what)
Pastes data from the clipboard to the selected range This method allows you to choose the type of data to paste: formulas only, values only, formats only, any combination of the previous types, or all of the types. |
void |
editPasteSpecial(short what)
Pastes data from the clipboard to the selected range. |
void |
endEdit()
Ends edit mode and applies changes to the active cell If an invalid entry has been made (e.g., an incorrect formula), edit mode cannot end. |
java.lang.String |
errorNumberToText(int error)
Deprecated. Returns a string containing the text of the corresponding to the specified error number |
void |
exportPDF(java.io.OutputStream outputstream)
export current sheet to the outputstream with pdf format |
void |
exportPDF(java.io.OutputStream outputstream,
boolean sheetOnly)
|
void |
exportPDF(java.lang.String fileName)
export current sheet to pdf file |
void |
filePrint(boolean showPrintDlg)
Prints the selected worksheet If the user-defined name Print_Area is defined, only those ranges specified in Print_Area are printed. |
void |
filePrint(boolean flag,
java.lang.Object obj)
|
FindReplaceInfo |
findFirst(int sheet1,
int row1,
int col1,
int sheet2,
int row2,
int col2,
java.lang.String findWhat,
int flags)
Finds the first cell in the current sheet for the given range. |
FindReplaceInfo |
findFirst(int row1,
int col1,
int row2,
int col2,
java.lang.String findWhat,
int flags)
Finds the first cell in the current sheet for the given range. |
FindReplaceInfo |
findFirst(java.lang.String findWhat,
int flags)
Finds the first cell in the current sheet for the given range. |
FindReplaceInfo |
findNext(java.lang.String findWhat,
int flags)
Finds the next cell containing the specified text |
FindReplaceInfo |
findNext(java.lang.String findWhat,
int flags,
FindReplaceInfo findreplaceinfo)
Finds the next cell containing the specified text |
void |
flushModifiedEvents()
Sends modified events to Modified event listeners and clears the flags indicating the events needed to be sent |
java.lang.String |
formatRCNr(int row,
int col,
boolean doAbsolute)
Returns a string containing a formatted row and column reference |
java.lang.String |
formatRCNr(int row1,
int col1,
int row2,
int col2,
boolean doAbsolute)
Returns a string containing a formatted area reference |
RangeRef |
formulaToRangeRef(java.lang.String formula)
Creates and returns an instance of RangeRef from a formula. |
RangeRef |
formulaToRangeRefLocal(java.lang.String formula)
Creates and returns an instance of RangeRef from a formula which is in user language. |
CellRef |
getActiveCell()
Returns the row and column coordinates of the active cell The active cell is the cell in which the cursor is currently located. |
int |
getActiveCol()
Returns the column of the active cell |
int |
getActiveRow()
Returns the row of the active cell |
java.lang.String |
getAutoFillItems(int index)
Returns an autofill list Autofill lists are frequently used series of text such as months and days of the week. |
int |
getAutoFillItemsCount()
Returns the number of existing autofill lists |
int |
getBackColorIndex()
|
java.awt.Color |
getBackGroundColor()
Returns the background color of the current sheet. |
BookAdapter |
getBookAdapter()
|
CellFormat |
getCellFormat()
Returns the format of the selected range of cells |
void |
getCellFormat(CellFormat cellformat)
Returns the format of the selected range of cells into the specified CellFormat object You can use this method to loop through cells, retrieving cell formats through the same instance of the CellFormat object. |
void |
getCellFormat(CellFormat cellformat,
int row1,
int col1,
int row2,
int col2)
Returns the format of the specified range of cells into the specified CellFormat object You can use this method to loop through cells, retrieving cell formats through the same instance of the CellFormat object. |
void |
getCellFormat(CellFormat cellformat,
int sheet1,
int row1,
int col1,
int sheet2,
int row2,
int col2)
Returns the format of the specified range of cells in the specified range of sheets into the specified CellFormat object You can use this method to loop through cells, retrieving cell formats through the same instance of the CellFormat object. |
CellFormat |
getCellFormat(int row1,
int col1,
int row2,
int col2)
Returns the format of the specified range of cells Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
CellFormat |
getCellFormat(int sheet1,
int row1,
int col1,
int sheet2,
int row2,
int col2)
Returns the format of the specified range of cells in the specified range of sheets Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
ChartShape |
getChart(int index)
Returns the first chart in the active worksheet. |
int |
getChartCount()
get the picture numbers in the current sheet |
java.lang.String |
getClip()
Imports tab-delimited text strings from workbooks. |
static java.awt.datatransfer.Clipboard |
getClipboard()
Returns the clipboard to be used for clipboard operations. |
java.lang.String |
getClipValues()
Imports values from workbooks |
int |
getCol()
Returns the active column in the active worksheet. |
int |
getColOutlineLevel(int col)
Returns the outline level of a single specified column. |
java.lang.String |
getColText(int col)
Returns the label for a column. |
int |
getColWidth(int col)
Returns the width of a single column. |
int |
getColWidthTwips(int col)
Returns the width of the specified column in twips Column width can be specified in units equal to 1/256th of the character O's width in the default font, or to twips, depending on the column width units specified for the workbook. |
short |
getColWidthUnits()
Returns whether column widths are stored and displayed in twips or character units. |
CommentShape |
getComment(int index)
Returns the specified comment in the active worksheet. |
CommentShape |
getComment(int row1,
int col1)
get the comment from the specified cell |
int |
getCommentCount()
Returns the Comment count in the active worksheet. |
ConditionFormat[] |
getConditionalFormats()
|
int |
getDefaultColWidth()
Returns the default column width |
java.lang.String |
getDefaultFontName()
Returns the name of the default font |
int |
getDefaultFontSize()
Returns the size of the default font |
int |
getDefaultRowHeight()
Returns the default height for rows. |
java.lang.String |
getDefinedName(int name)
Returns a defined name |
java.lang.String |
getDefinedName(java.lang.String name)
Returns the definition associated with a name, in US English. |
int |
getDefinedNameCount()
Returns the number of defined names in a view |
java.lang.String |
getDefinedNameLocal(java.lang.String name)
Returns the definition of a defined name in the user's local language A defined name can refer to a cell, a group of cells, a value, or a formula. |
java.lang.String |
getEntry()
Returns the contents of the active cell in the first selected worksheet in edit mode format For example, if the cell contains a formula, the text of the formula is displayed. |
java.lang.String |
getEntry(int row,
int col)
Returns the text value of the specified cell in the first selected worksheet in edit mode format For example, if the cell contains a formula, the text of the formula is displayed. |
java.lang.String |
getEntry(int sheet,
int row,
int col)
Returns the text value of the specified cell in the first selected worksheet in edit mode format For example, if the cell contains a formula, the text of the formula is displayed. |
java.lang.String |
getEntry(java.lang.String location)
Returns the value of the specified cell in edit mode format. |
java.awt.Color |
getExtraColor()
Returns the extra color of the current sheet. |
int |
getExtraColorIndex()
|
java.lang.String |
getFileName()
Returns the name of the workbook file currently attached to a view. |
NumberFormat |
getFirstNumberFormat()
Returns a NumberFormat object representing the first entry in the workbook's number format table. |
GRObject |
getFirstObject()
Returns the first object in the active worksheet This method can be used in conjunction with the getNextObject method to to loop through all the objects in a worksheet. |
ShapeObj |
getFirstShapeObj()
|
int |
getFixedCol()
Returns the starting fixed column. |
int |
getFixedCols()
Returns the number of fixed columns or zero if there are none. |
int |
getFixedRow()
Returns the starting fixed row. |
int |
getFixedRows()
Returns the number of fixed rows or zero if there are none. |
java.lang.String |
getFormattedText()
Returns the formatted text value of the active cell. |
java.lang.String |
getFormattedText(int row,
int col)
Returns the formatted text value of the specified cell This method returns the text as it is seen in the worksheet, including all formatting. |
java.lang.String |
getFormattedText(int sheet,
int row,
int col)
Returns the value of the specified cell as it appears in the specified worksheet This method returns the text as it is seen in the worksheet, including all formatting. |
java.lang.String |
getFormula()
Returns the formula of the active cell. |
java.lang.String |
getFormula(int row,
int col)
Returns the the text of the formula of the specified cell, in US English. |
java.lang.String |
getFormula(int sheetnum,
int row,
int col)
Returns the the text of the formula of the specified cell, in US English. |
java.lang.String |
getFormulaLocal()
Returns the text of the formula of the active cell, in the user's language |
java.lang.String |
getFormulaLocal(int row,
int col)
Returns the the text of the formula of the specified cell, in the user's language |
java.lang.String |
getFormulaLocal(int sheetnum,
int row,
int col)
Returns the the text of the formula of the specified cell in the specified sheet, in the user's language |
java.lang.String |
getGroup()
Returns the group name for the workbook attached to this view. |
int |
getHeaderHeight()
Returns the height of the column headers. |
int |
getHeaderWidth()
Returns the width of the row headers. |
HyperLink |
getHyperlink(int row,
int col)
get the specified index hyperlink object from current sheet |
HyperLink[] |
getHyperlinks(int sheet)
returns an array of hyperlinks in the specified sheet |
HyperLink[] |
getHyperlinks(int row1,
int col1,
int row2,
int col2)
returns an array of hyperlinks in the specified range |
int |
getIterationMax()
Returns the maximum number of calculation iterations Iteration can be used to resolve circular references. |
double |
getIterationMaxChange()
Returns the maximum iteration change value Iteration can be used to resolve circular references. |
int |
getLastCol()
Returns the number of the last occupied column This method returns the last column that is not empty, including cells that contain only formatting. |
int |
getLastColForRow(int rownum)
Returns the number of the last occupied column in the specified row This method returns the last column that is not empty, including cells that contain only formatting. |
int |
getLastRow()
Returns the number of the last occupied row This method returns the last row that is not empty, including cells that contain only formatting. |
int |
getLeftCol()
Returns the first column currently displayed in this view. |
void |
getLock()
Locks all views and workbooks in the current group. |
int |
getMaxCol()
Returns the last column which may be displayed in the current sheet. |
int |
getMaxRow()
Returns the last row which may be displayed in the current sheet. |
RangeRef[] |
getMergedCells()
return the list merged ranges from the current selected worksheet |
int |
getMinCol()
Returns the first column that can be displayed in the active worksheet. |
int |
getMinRow()
Returns the first row that can be displayed in the active worksheet. |
short |
getMode()
Returns the current mode for mouse actions in a view |
Book |
getModelBook()
|
int |
getNextColPageBreak(int col)
Returns the next column where there is a page break |
NumberFormat |
getNextNumberFormat(NumberFormat numberformat)
Returns a NumberFormat object containing the next entry in the workbook's number format table. |
int |
getNextRowPageBreak(int row)
Returns the next row where there is a page break |
double |
getNumber()
Returns the numeric value of the active cell Cells containing a formula return the numeric result of the formula. |
double |
getNumber(int row,
int col)
Returns the numeric value of the specified cell. |
double |
getNumber(int sheet,
int row,
int col)
Returns the numeric value of the specified cell in the specified worksheet Cells containing a formula return the numeric result of the formula. |
int |
getNumSheets()
Returns the number of worksheets in the current workbook |
java.awt.Color |
getPaletteEntry(int entry)
Returns a color in the jxcell color palette |
javax.swing.JFrame |
getParentFrame()
Returns the parent window |
int |
getPictureCount()
get the picture numbers in the current sheet |
PictureShape |
getPictureShape(int index)
Returns the specified index picture from the active worksheet. |
short |
getPolyEditMode()
Returns the mode for interactive polygon editing In normal polygon editing mode (0), only the width and height of polygons can be interactively edited. |
java.lang.String |
getPrintArea()
Returns the current print area The returned string is based on the user-defined name, Print_Area, which defines the worksheet range to be printed. |
java.lang.String |
getPrintAreaLocal()
Returns the current print area inuser language The returned string is based on the user-defined name, Print_Area, which defines the worksheet range to be printed. |
double |
getPrintBottomMargin()
Returns the bottom print margin in inches. |
int |
getPrintFirstPageNumber()
|
java.lang.String |
getPrintFooter()
Returns the current page footer The following list shows the special codes the footer text can contain. |
double |
getPrintFooterMargin()
Returns the page footer margin used during printing The header and footer margins can be printed. |
java.lang.String |
getPrintHeader()
Returns the page header printed at the top of each page The following list shows the special codes the footer text can contain. |
double |
getPrintHeaderMargin()
Returns the page header margin used during printing The header and footer margins can be printed. |
double |
getPrintLeftMargin()
Returns the left print margin in inches. |
int |
getPrintPaperSize()
|
double |
getPrintRightMargin()
Returns the right print margin in inches. |
int |
getPrintScale()
Returns the scale factor for the active worksheet |
int |
getPrintScaleFitHPages()
Returns the number of horizontal pages to which the print job is fit |
int |
getPrintScaleFitVPages()
Returns the number of vertical pages to which the print job is fit |
java.lang.String |
getPrintTitles()
Returns the print titles to be printed at the top of each page Print titles are row and column titles that are printed on each page. |
java.lang.String |
getPrintTitlesLocal()
Returns the print titles to be printed at the top of each page in user language Print titles are row and column titles that are printed on each page. |
double |
getPrintTopMargin()
Returns the top print margin in inches. |
int |
getRow()
Returns the row of the active cell. |
int |
getRowHeight(int row)
Returns the height of a single specified row. |
int |
getRowOutlineLevel(int row)
Returns the outline level of a single specified row. |
GRObject |
getSelectedObject(int selection)
Returns the ID of a selected object. |
int |
getSelectedObjectCount()
Returns the number of selected objects. |
ShapeObj |
getSelectedShapeObj(int selection)
|
int |
getSelectedShapeObjCount()
|
RangeRef |
getSelection()
Returns the row and column coordinates of a selected range. |
RangeRef |
getSelection(int i)
|
int |
getSelectionCount()
Returns the number of selected ranges in the active worksheet. |
java.lang.String |
getSelectionLocal()
Returns the start and end row and column of the specified selection, in the user's language. |
int |
getSelEndCol()
Returns the last selected column. |
int |
getSelEndRow()
Returns the last selected row. |
Sheet |
getSelSheet()
|
int |
getSelStartCol()
Returns the first selected col. |
int |
getSelStartRow()
Returns the first selected row. |
int |
getSheet()
Returns the active worksheet. |
int |
getSheetHiddenState()
Returns the hidden state for the sheet. |
java.lang.String |
getSheetName(int sheet)
Returns the name of the specified worksheet. |
int |
getSheetsCount()
|
int |
getSheetTabColor()
|
short |
getShowHScrollBar()
Returns the mode for the horizontal scroll bar. |
short |
getShowTabs()
Returns the display status and position of the sheet name tabs on a workbook. |
short |
getShowVScrollBar()
Returns the mode for the vertical scroll bar. |
java.lang.String |
getTabbedText(int row1,
int col1,
int row2,
int col2,
boolean valuesOnly)
Takes the specified range of data and converts it to a tab-delimited block of text. |
java.lang.String |
getText()
Returns the text representation of the value of the active cell. |
java.lang.String |
getText(int row,
int col)
Returns the text value of the specified cell |
java.lang.String |
getText(int sheet,
int row,
int col)
Returns the text value of the specified cell |
int |
getTopRow()
Returns the top row displayed in the active worksheet. |
short |
getType()
Returns the cell type of the active cell. |
short |
getType(int row,
int col)
Returns the cell type of the specified cell. |
short |
getType(int sheet,
int row,
int col)
Returns the cell type of the specified cell. |
DataValidation |
getValidation(int row1,
int col1)
get the validation object from specified cell |
int |
getValueFormatCount()
|
java.lang.String |
getValueFormatStr(int i)
|
int |
getValueFormatType(int i)
|
static java.lang.String |
getVersionString()
Returns the version of the component in a string. |
int |
getViewScale()
Returns the current display scale for a workbook. |
java.lang.String |
getWorkbookName()
Returns the name assigned to the workbook associated with the current view control |
void |
groupShapes()
|
void |
initWorkbook()
|
void |
insertRange(int row1,
int col1,
int row2,
int col2,
short shifttype)
Moves the specified range in order to insert new cells, rows or columns. |
void |
insertSheets(int sheet,
int sheets)
Inserts one or more worksheets at the specified location. |
boolean |
isAllowAutoFill()
Returns true if auto fill is enabled. |
boolean |
isAllowCellTextDlg()
|
boolean |
isAllowDelete()
Returns true if the delete key deletes records and clears selection. |
boolean |
isAllowEditHeaders()
Returns true if users can edit row, column and top left headers. |
boolean |
isAllowFillRange()
Returns true if the user is allowed to fill a range by clicking and dragging with the mouse, false otherwise. |
boolean |
isAllowFormulas()
Returns true if the user is allowed to enter and edit formulas, false otherwise. |
boolean |
isAllowInCellEditing()
Returns true if cells are edited in place, false otherwise. |
boolean |
isAllowMoveRange()
Returns true of the user is allowed to move a range by clicking and dragging with the mouse, false otherwise. |
boolean |
isAllowSelections()
Returns true if the user is allowed to change the selection with the keyboard or mouse, false otherwise. |
boolean |
isAutoRecalc()
Returns whether or not automatic recalc is on. |
boolean |
isBorder()
Returns whether or not a black border is painted around the workbook. |
boolean |
isCanEditPaste()
Returns true if the internal clipboard or Windows' clipboard contains items that can be pasted to the worksheet. |
boolean |
isCanEditPasteSpecial()
Returns true if the internal clipboard or Windows' clipboard contains items that can be pasted to the worksheet using the Paste Special command. |
boolean |
isColHeaderSelected()
Returns true if the column headings are selected. |
boolean |
isColHidden(int col)
Returns true if the column is hidden. |
boolean |
isDefaultRowHeightAutomatic()
Returns true if row height is automatic. |
boolean |
isEnableProtection()
Returns true if protection is enabled for all sheets in a workbook. |
boolean |
isFormatPaintMode()
Returns true if FormatPaint Mode is enabled. |
boolean |
isHiddenDefinedName(int name)
|
boolean |
isIterationEnabled()
Returns true if iteration is enabled. |
boolean |
isLogical()
Returns the logical (True or False) value of the active cell. |
boolean |
isLogical(int row,
int col)
Returns the logical (True or False) value of the specified cell. |
boolean |
isLogical(int nSheet,
int nRow,
int nCol)
Returns the logical (True or False) value of the specified cell. |
boolean |
isLotusEvaluation(int i)
|
boolean |
isPrecisionAsDisplayed()
Returns true if all cell values are rounded to the displayed precision, False otherwise. |
boolean |
isPrintAutoPageNumbering()
|
boolean |
isPrintColHeading()
Returns True if column headings are enabled and printed at the top of the worksheet, False otherwise. |
boolean |
isPrintGridLines()
Returns True if grid lines are printed for the current sheet, False otherwise |
boolean |
isPrintHCenter()
Returns whether or not the current sheet centered horizontally when printed. |
boolean |
isPrintLandscape()
Returns True if the workbook is printed with a landscape orientation, False otherwise. |
boolean |
isPrintLeftToRight()
Returns whether the current sheet is printed left to right then top to bottom, or top to bottom then left to right. |
boolean |
isPrintNoColor()
Returns True if all workbook colors are converted to black and white, and all patterns are removed, False otherwise. |
boolean |
isPrintRowHeading()
Returns whether or not row headings are printed for the current sheet. |
boolean |
isPrintScaleFitToPage()
Returns True if the workbook is printed on the number of vertical and horizontal pages returned by the setPrintScaleFitHPages method, returns False if the scale percentage returned is used to print the workbook. |
boolean |
isPrintVCenter()
Returns True if the current sheet is centered vertically when printed, False otherwise. |
boolean |
isRepainting()
Returns True if repainting occurs in the entire window when Windows sends a WM_PAINT message, False otherwise. |
boolean |
isRowHeaderSelected()
Returns True if row headings are selected, False otherwise. |
boolean |
isRowHeightAutomatic(int row)
Returns True if row height is automatic, False otherwise. |
boolean |
isRowHidden(int row)
Returns True if row is hidden, False otherwise. |
boolean |
isScrollToLastRC()
Returns True if scroll bars can scroll the last filled cell in the workbook to the top-left edge of the window. |
boolean |
isSheetProtected(int sheet)
Returns true if protection is enabled for the specified sheet. |
boolean |
isSheetSelected(int sheet)
Returns True if worksheet is selected, False otherwise. |
boolean |
isShowColHeading()
Returns True if column headings are displayed, False otherwise. |
boolean |
isShowContextMenus()
|
boolean |
isShowEditBar()
Returns True if the edit bar is displayed with the workbook, False otherwise. |
boolean |
isShowEditBarCellRef()
Returns True if isShowEditBar is True. |
boolean |
isShowFormulas()
Returns True if formula text is displayed in cells instead of the values formulas produce, False otherwise. |
boolean |
isShowGridLines()
Returns true if grid lines are shown, false otherwise. |
boolean |
isShowRowHeading()
Returns true if row headings are shown, false otherwise. |
boolean |
isShowTypeMarkers()
Returns True if the following frame types are used to identify different types of cells, False otherwise: Cell Type Frame Marker Empty cell None Blank formatted cell Blue frame Value cell (holds a number or text) Green frame Formula cell Red frame |
boolean |
isShowZeroValues()
Returns True if cells with zero values are displayed, False, otherwise |
boolean |
isSummaryColsBeforeDetail()
Returns true if col outline summaries are before col detail information. |
boolean |
isSummaryRowsBeforeDetail()
Returns true if row outline summaries are before row detail information. |
boolean |
isTopLeftHeaderSelected()
Returns True if top left header is selected, False otherwise. |
boolean |
isValueFormatHidden(int i)
|
int |
messageBox(java.lang.String message,
java.lang.String caption,
short type)
Displays a message in a dialog box, waits for the user to click a button, and returns an Integer indicating which button the user clicked. |
void |
moveRange(int row1,
int col1,
int row2,
int col2,
int rowOffset,
int colOffset)
Moves a range of cells. |
void |
moveSheet(int i)
|
void |
objectBringToFront()
Places the selected objects in front of all unselected objects in a view. |
short |
objectPosToPixels(double x1,
double y1,
double x2,
double y2,
java.awt.Rectangle rectangle)
Given an object position in relation to rows and columns, this method returns the object position in pixels. |
short |
objectPosToTwips(double x1,
double y1,
double x2,
double y2,
java.awt.Rectangle rectangle)
Given an object position in relation to rows and columns, this method returns the object position in twips. |
void |
objectSendToBack()
Places the selected objects behind all unselected objects in a view. |
void |
paint(java.awt.Graphics g)
|
short |
rangeToPixels(int row1,
int col1,
int row2,
int col2,
java.awt.Rectangle rectangle)
Returns the offset, width, and height of the specified range in pixels. |
short |
rangeToTwips(int row1,
int col1,
int row2,
int col2,
java.awt.Rectangle rectangle)
Determines the offset, width, and height of the specified range in twips. |
short |
read(java.io.InputStream inputstream)
Reads a worksheet or workbook from disk |
short |
read(java.io.InputStream inputstream,
java.lang.String pass)
Reads a worksheet or workbook from disk |
short |
read(java.lang.String filename)
Reads a worksheet or workbook from disk. |
short |
read(java.lang.String filename,
java.lang.String pass)
Reads a worksheet or workbook from disk. |
short |
readFromBlob(byte[] blob)
Reads a worksheet or workbook that has been stored in memory in a byte array |
short |
readURL(java.lang.String spec)
Loads a worksheet from a URL address. |
short |
readURL(java.lang.String url,
java.lang.String password)
Loads a worksheet from a URL address. |
short |
readURL(java.net.URL url)
|
void |
readXLSX(java.io.InputStream in)
Reads a worksheet or workbook from excel xlsx inputstream. |
void |
readXLSX(java.lang.String filename)
Reads a worksheet or workbook from excel xlsx file. |
void |
recalc()
Recalculates the workbook attached to a view. |
void |
recalcAll()
|
void |
releaseLock()
Release a lock obtained by getLock(). |
void |
removeCancelEditListener(CancelEditListener canceleditlistener)
Removes the specified listener so it no longer receives events |
void |
removeChart(int index)
remove specified index chart from current sheet |
void |
removeColPageBreak(int col)
Removes a vertical page break adjacent to the left edge of the specified column. |
void |
removeComment(CommentShape comment)
remove the specified comment from the current sheet |
void |
removeEndCellModifyListener(CellModifyListener cellModifyListener)
|
void |
removeEndEditListener(EndEditListener endeditlistener)
Removes the specified listener so it no longer receives events |
void |
removeEndRecalcListener(EndRecalcListener endrecalclistener)
Removes the specified listener so it no longer receives events |
void |
removeFilter()
|
void |
removeHyperlink(HyperLink hyperlink)
remove the hyperlink from the sheet |
void |
removeHyperlinkListener(HyperlinkListener hyperlinklistener)
|
void |
removeModifiedListener(ModifiedListener modifiedlistener)
Removes the specified listener so it no longer receives events |
void |
removeObject(GRObject grobject)
Removes the specified object. |
void |
removeObjectListener(ObjectListener objectlistener)
Removes the specified listener so it no longer receives events |
void |
removePageBreak()
Removes vertical and horizontal page breaks adjacent to the current cell. |
void |
removePicture(int index)
remove specified index image from current sheet |
void |
removeRowPageBreak(int row)
Removes a horizontal page break adjacent to the current cell |
void |
removeSelectionChangedListener(SelectionChangedListener selectionchangedlistener)
Removes the specified listener so it no longer receives events |
void |
removeShapeObj(ShapeObj grobject)
|
void |
removeStartCellModifyListener(CellModifyListener cellModifyListener)
|
void |
removeStartEditListener(StartEditListener starteditlistener)
Removes the specified listener so it no longer receives events |
void |
removeStartRecalcListener(StartRecalcListener startrecalclistener)
Removes the specified listener so it no longer receives events |
void |
removeUpdateListener(UpdateListener updatelistener)
Removes the specified listener so it no longer receives events |
void |
removeValidationFailedListener(ValidationFailedListener validationfailedlistener)
Removes the specified listener so it no longer receives events |
void |
removeViewChangedListener(ViewChangedListener viewchangedlistener)
Removes the specified listener so it no longer receives events |
boolean |
replace(java.lang.String findWhat,
java.lang.String replaceWith,
int flags,
FindReplaceInfo findreplaceinfo)
Invokes a find and replace session in a jxcell workbook and sets the criteria for the find and replace actions. |
void |
resumeSheetProtection(long l)
|
static java.awt.Color |
rgb2Color(int iRgb)
Converts an Integer RGB(0x00rrggbb) to a awt Color |
void |
saveWindowInfo()
|
void |
selectionChanged(ViewEvent viewevent)
|
void |
setActiveCell(int row,
int col)
Sets the row and column coordinates of the active cell The active cell is the cell in which the cursor is currently located. |
void |
setAllowAutoFill(boolean allowAutoFill)
Sets a value indicating whether auto fill is enabled. |
void |
setAllowCellTextDlg(boolean allowCellTextDlg)
|
void |
setAllowDelete(boolean allowDelete)
Sets a value indicating whether the delete key clears selections. |
void |
setAllowEditHeaders(boolean allowEditHeaders)
Sets a value indicating whether row, column, and top left headers can be edited. |
void |
setAllowFillRange(boolean allowFillRange)
Sets the flag which determines whether users are allowed to fill a range by clicking and dragging with the mouse. |
void |
setAllowFormulas(boolean allowFormulas)
Sets the flag which determines whether the user is allowed to enter and edit formulas. |
void |
setAllowInCellEditing(boolean allowInCellEditing)
Sets the flag which determines whether cells are edited in place. |
void |
setAllowMoveRange(boolean allowMoveRange)
Sets the flag which determines whether users are allowed to move a range by clicking and dragging with the mouse |
void |
setAllowSelections(boolean allowSelections)
Sets the flag which determines whether a user is allowed to change the selections with the keyboard or mouse. |
void |
setArrayFormula(int row,
int col,
int row2,
int col2,
java.lang.String formula)
Sets the array formula for the specified range. |
void |
setAutoFillItems(int index,
java.lang.String items)
Sets an autofill list. |
void |
setAutoRecalc(boolean autoRecalc)
Sets the flag which determines whether or not automatic recalc is on. |
void |
setBackColorIndex(int color)
|
void |
setBackGroundColor(java.awt.Color color)
Sets the background color. |
void |
setBookProtection(boolean bProtected,
int protect,
java.lang.String password)
Sets whether protection is enabled for this workbook. |
void |
setBorder(boolean border)
Sets wether the workbook has a border painted around it. |
void |
setBoundsWithClip(int x,
int y,
int width,
int height,
int x1,
int y1,
int width1,
int height1)
|
void |
setCellFormat(CellFormat cellformat)
Sets the format of the selected range of cells |
void |
setCellFormat(CellFormat cellformat,
int row1,
int col1,
int row2,
int col2)
Sets the format of the specified range of cells Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0. |
void |
setCellFormat(CellFormat cellformat,
int sheet1,
int row1,
int col1,
int sheet2,
int row2,
int col2)
Sets the format of the specified range of cells in the specified range of sheets |
void |
setChartSheet(int sheet)
|
void |
setClip(java.lang.String text)
Exports a tab-delimited text block to a worksheet at run time. |
static void |
setClipboard(java.awt.datatransfer.Clipboard clipboard)
Sets the clipboard to be used for clipboard operations. |
void |
setClipValues(java.lang.String text)
Exports tab-delimited text strings to a workbook at run time ignoring any formatting applied to the text. |
void |
setCol(int col)
Sets the column of the active cell. |
void |
setColHeaderSelected(boolean colHeaderSelected)
Sets a value indicating whether or not column headers can be selected. |
void |
setColHidden(int col,
boolean colHidden)
Sets a value indicating whether or not the specified column is hidden. |
void |
setColHidden(int col1,
int col2,
boolean colHidden)
Sets the display status of the specified range of columns |
void |
setColOutlineLevel(int col1,
int col2,
int outlineLevel,
boolean additive)
Sets the outline level of a range of columns. |
void |
setColText(int col,
java.lang.String colText)
Sets the label for a column. |
void |
setColWidth(int col,
int width)
Sets the width of a single column. |
void |
setColWidth(int col1,
int col2,
int width,
boolean defColWidth)
Sets the width of a single column. |
void |
setColWidthAuto(int row1,
int col1,
int row2,
int col2,
boolean setDefaults)
Sets the widths of the specified columns to automatically adjust to the largest column entry, including the header. |
void |
setColWidthTwips(int col1,
int width)
Changes the width of one or more columns to the specified number of twips. |
void |
setColWidthTwips(int col1,
int col2,
int width,
boolean defColWidth)
Changes the width of one or more columns to the specified number of twips. |
void |
setColWidthUnits(short colWidthUnits)
Sets how the column width is stored and displayed. |
void |
setConditionalFormats(ConditionFormat[] condfmts)
Sets the specified conditional formats for the current selection. |
void |
setCSVString(java.lang.String csv)
|
void |
setCustomMessage(int msgNo,
java.lang.String text)
map for custom message 0 LockedCells 1 SheetIsProtected 2 DuplicateSheetName |
void |
setDataValidation(DataValidation dataValidation)
Sets the specified data validations for the current selection. |
void |
setDefaultColWidth(int width)
Sets the default column width. |
void |
setDefaultFont(java.lang.String fontName,
int fontSize)
Sets the default font and the font size. |
void |
setDefaultFontName(java.lang.String fontName)
Sets the default font by name. |
void |
setDefaultFontSize(int fontSize)
Sets the default font size. |
void |
setDefaultRowHeight(int height)
Sets the default row height. |
void |
setDefaultRowHeightAutomatic(boolean automatic)
Sets whether the default row height is determined automatically. |
void |
setDefinedName(java.lang.String name,
java.lang.String formula)
Sets the formula associated with a defined name, in US English. |
void |
setDefinedNameLocal(java.lang.String name,
java.lang.String formula)
Sets the formula definition for a user-defined name, in the user's language. |
void |
setDropDownBKColor(int color)
|
void |
setDropDownFontName(java.lang.String name)
|
void |
setDropDownFontSize(int size)
|
void |
setDropDownItemsSorted(boolean size)
|
void |
setEnableProtection(boolean enableProtection)
Sets whether protection is enabled for all selected sheets. |
void |
setErrorText(int errNo,
java.lang.String errText)
Deprecated. set error text of the corresponding to the specified error number |
void |
setExtraColor(java.awt.Color color)
Sets the color used to fill any extra space to the right and below the sheet. |
void |
setExtraColorIndex(int color)
|
void |
setFixedCol(int col)
Sets the number of fixed columns. |
void |
setFixedCols(int cols)
Sets the number of fixed columns. |
void |
setFixedCols(int nCol1,
int nCols)
Sets the number of fixed columns. |
void |
setFixedRow(int row)
Sets the starting fixed row. |
void |
setFixedRows(int rows)
Sets the number of fixed rows. |
void |
setFixedRows(int nRow1,
int nRows)
Sets the number of fixed rows. |
void |
setFormatPaintMode(boolean isFormatPaintMode)
Sets the Format Paint Mode. |
void |
setFormula(int sheet,
int row,
int col,
java.lang.String formula)
Sets the formula for the specified cell on the specified sheet. |
void |
setFormula(int row,
int col,
java.lang.String formula)
Sets the formula for the specified cell in all selected sheets. |
void |
setFormula(java.lang.String formula)
Sets the formula for the active cell for all selected sheets. |
void |
setFormulaLocal(int sheet,
int row,
int col,
java.lang.String formula)
Sets the text version of the formula of the specified cell in the specified worksheet in the user's language. |
void |
setFormulaLocal(int row,
int col,
java.lang.String formula)
Sets the text version of the formula of the specified cell, in the user's language. |
void |
setFormulaLocal(java.lang.String formula)
Sets the text version of the formula in the active cell, in the user's language. |
void |
setGroup(java.lang.String group)
Sets the group name for the workbook attached to this view. |
void |
setHeaderHeight(int height)
Sets the height of the column headers on all selected sheets. |
void |
setHeaderSelection(boolean topLeftHeader,
boolean rowHeader,
boolean colHeader)
Sets whether the row and column headings are selected. |
void |
setHeaderWidth(int width)
Sets the width of the row headers of all selected sheets. |
void |
setIterationEnabled(boolean iterationEnabled)
Sets whether iteration is enabled. |
void |
setIterationMax(int iterationMax)
Sets the maximum number of iterations. |
void |
setIterationMaxChange(double iterationMaxChange)
Sets the maximum iteration change value. |
void |
setLeftCol(int leftCol)
Sets the leftmost column currently displayed in the view. |
void |
setLogical(boolean logical)
Sets the logical (True or False) value of the active cell in all selected worksheets. |
void |
setLogical(int row,
int col,
boolean logical)
Sets the logical (True or False) value of the specified cell in all selected worksheets. |
void |
setLogical(int sheet,
int row,
int col,
boolean logical)
Sets the logical (True or False) value of the specified cell in the specified worksheet. |
void |
setLotusEvaluation(int i,
boolean v)
|
void |
setMaxCol(int maxCol)
Sets the maximum column which may be displayed in the current sheet. |
void |
setMaxRow(int maxRow)
Sets the maximum row which may be displayed in the current sheet. |
void |
setMinCol(int minCol)
Sets the first column that can be displayed in the current worksheet. |
void |
setMinRow(int minRow)
Sets the first row that can be displayed in the current worksheet. |
void |
setMode(short mode)
Sets the current mode for mouse actions in a view |
void |
setNumber(double number)
Sets the numeric value of the active cell in all selected sheets. |
void |
setNumber(int row,
int col,
double number)
Sets the numeric value of the specified cell in all selected sheets. |
void |
setNumber(int sheet,
int row,
int col,
double number)
Sets the numeric value of the specified cell in the specified worksheet. |
void |
setNumSheets(int sheets)
Sets the number of worksheets in the current workbook. |
void |
setPaletteEntry(int entry,
java.awt.Color color)
Sets a color in the jxcell color palette. |
void |
setPolyEditMode(short polyEditMode)
Sets the mode for interactive polygon editing. |
void |
setPrecisionAsDisplayed(boolean precisionAsDisplayed)
Determines whether cell values are stored as entered or as displayed |
void |
setPrintArea()
Sets the current print area. |
void |
setPrintArea(java.lang.String formula)
Sets the current print area to the specified range. |
void |
setPrintAreaLocal(java.lang.String formula)
Sets the current print area to the specified range in user language. |
void |
setPrintAutoPageNumbering(boolean v)
|
void |
setPrintBottomMargin(double printBottomMargin)
Sets the bottom print margin. |
void |
setPrintColHeading(boolean printColHeading)
Determines whether column headings are printed. |
void |
setPrintFirstPageNumber(int v)
|
void |
setPrintFooter(java.lang.String printFooter)
Sets the current page footer The following list shows the special codes the footer text can contain. |
void |
setPrintFooterMargin(double printFooterMagrin)
Sets the page footer margin used during printing The header and footer margins can be printed. |
void |
setPrintGridLines(boolean printGridLines)
Sets the flag which determines whether or not grid lines are printed for the current sheet. |
void |
setPrintHCenter(boolean printHCenter)
Sets the flag which determines whether or not the current sheet is centered horizontally when printed. |
void |
setPrintHeader(java.lang.String printHeader)
Sets the page header printed at the top of each page The following list shows the special codes the footer text can contain. |
void |
setPrintHeaderMargin(double printHeaderMargin)
Sets the page header margin used during printing The header and footer margins can be printed. |
void |
setPrintLandscape(boolean printLandscape)
Determines the direction of the print job. |
void |
setPrintLeftMargin(double printLeftMargin)
Sets the left print margin. |
void |
setPrintLeftToRight(boolean printLeftToRight)
Sets the flag which determines whether the current sheet is to be printed left to right then top to bottom, or top to bottom then left to right. |
void |
setPrintNoColor(boolean printNoColor)
Determines whether job is printed in color or black and white Color formats are translated by the printer driver and printed as patterns. |
void |
setPrintPaperSize(int v)
|
void |
setPrintPaperSize(int width,
int height)
Sets the size of the paper in twips. |
void |
setPrintRightMargin(double printRightMargin)
Sets the right print margin. |
void |
setPrintRowHeading(boolean printRowHeading)
Sets the flag which determines whether or not row headings are printed for the current sheet. |
void |
setPrintScale(int scale)
Sets the scale factor for the active worksheet To print a worksheet at the largest scale possible, set this value to 400 and setPrintScaleToFitPage to True.Then, specify the number of pages on which you want the worksheet printed. |
void |
setPrintScale(int scale,
boolean fitToPage,
int verticalPages,
int horizontalPages)
Sets the scale factor for the active worksheet |
void |
setPrintScaleFitHPages(int fitToPage)
Sets sets whether pages are scaled to fit the specified number of pages when printed. |
void |
setPrintScaleFitToPage(boolean horizontalPages)
Sets the number of horizontal pages to which the print job is fit This value has no effect if setPrintScaleFitToPage is False. |
void |
setPrintScaleFitVPages(int verticalPages)
Sets the number of vertical pages to which the print job is fit. |
void |
setPrintTitles()
Sets the current selection to be the print titles to be printed at the top of each page Print titles are row and column titles that are printed on each page. |
void |
setPrintTitles(java.lang.String formula)
Sets the print titles to be printed at the top of each page |
void |
setPrintTitlesLocal(java.lang.String formula)
Sets the print titles to be printed at the top of each page in user language |
void |
setPrintTopMargin(double printTopMargin)
Sets the top print margin. |
void |
setPrintVCenter(boolean printVCenter)
Sets the flag which determines whether or not the current sheet is centered verticall when printed. |
void |
setRepainting(boolean repaint)
Sets the flag which determines whether or not this view is painted. |
void |
setRow(int row)
Sets the row of the active cell. |
void |
setRowHeaderSelected(boolean rowHeaderSelected)
Determines if the row header is selected. |
void |
setRowHeight(int row,
int height)
Sets the height of a single specified row. |
void |
setRowHeight(int row1,
int row2,
int height,
boolean defRowHeight,
boolean automatic)
Sets the height of a range of rows. |
void |
setRowHeightAuto(int row1,
int col1,
int row2,
int col2,
boolean setDefaults)
Specifies that the heights of the rows in the specified range are automatically set to display the tallest entry in the specified rows. |
void |
setRowHeightAutomatic(int row,
boolean automatic)
Specifies that the heights of the specified row is automatically set to display the tallest entry in the row. |
void |
setRowHidden(int row,
boolean rowHidden)
Changes the display status of the specified row. |
void |
setRowHidden(int row1,
int row2,
boolean rowHidden)
Changes the display status of the specified rows. |
void |
setRowOutlineLevel(int row1,
int row2,
int outlineLevel,
boolean additive)
Sets the outline level of a range of rows. |
void |
setRowText(int row,
java.lang.String rowText)
Sets the name for the specified row. |
void |
setScrollToLastRC(boolean scrollToLastRC)
Sets how scrollbars work. |
void |
setSelection(int row1,
int col1,
int row2,
int col2)
Selects the range represented by the specified parameters and moves the active cell to the top left cell in the range. |
void |
setSelection(RangeRef rangeref)
Selects the range represented by the specified RangeRef object and moves the active cell to the top left cell in the range. |
void |
setSelection(java.lang.String string)
Selects the range represented by the specified formula and moves the active cell to the top left cell in the range. |
void |
setSelectionLocal(java.lang.String string)
Selects the range represented by the specified formula and moves the active cell to the top left cell in the range. |
void |
setSelEndCol(int selEndCol)
Sets the last selected column. |
void |
setSelEndRow(int selEndRow)
Sets the last selected row. |
void |
setSelLine(int lineWidth,
int lineColor,
int fillColor)
|
void |
setSelStartCol(int selStartCol)
Sets the first selected column. |
void |
setSelStartRow(int selStartRow)
Sets the first selected row. |
void |
setSheet(int sheet)
Sets the active worksheet. |
void |
setSheetHidden(int hidden)
Sets the hidden state for the current selected sheet. |
void |
setSheetName(int sheet,
java.lang.String sheetName)
Assigns a name to the specified worksheet . |
void |
setSheetProtected(int sheet,
boolean bProtected,
java.lang.String password)
Sets whether protection is enabled for the specified sheet. |
void |
setSheetProtected(int sheet,
int protect,
java.lang.String password)
Sets whether protection is enabled for the specified sheet. |
void |
setSheetsCount(int sheets)
|
void |
setSheetSelected(int sheet,
boolean selected)
Sets which sheet is selected. |
void |
setSheetTabColor(java.awt.Color color)
|
void |
setShowColHeading(boolean showColHeadings)
Sets whether column headings are displayed |
void |
setShowContextMenus(boolean value)
|
void |
setShowEditBar(boolean showEditBar)
Sets whether the edit bar is displayed. |
void |
setShowEditBarCellRef(boolean showEditBarCellRef)
Sets whether the reference of the active cell appears with the edit bar. |
void |
setShowFormulas(boolean showFormulas)
Sets whether formulas are displayed in place of cell values |
void |
setShowGridLines(boolean showGridLines)
Sets whether grid lines are displayed. |
void |
setShowHScrollBar(short showHScrollBar)
Sets the mode for the horizontal scroll bar |
void |
setShowRowHeading(boolean showRowHeading)
Sets the flag which determines whether row headings are shown. |
void |
setShowSelections(short showSelections)
Sets the mode for highlighting selections. |
void |
setShowTabs(short showTabs)
Sets the display status and position of the sheet name tabs on a workbook. |
void |
setShowTypeMarkers(boolean showTypeMarkers)
Sets whether frames are displayed around cells to identify the cell types. |
void |
setShowVScrollBar(short showVScrollBar)
Sets the mode for the vertical scroll bar. |
void |
setShowZeroValues(boolean showZeroValues)
Sets or returns whether zero value cells are displayed. |
void |
setSummaryColsBeforeDetail(boolean summaryBeforeDetail)
Sets whether col outline summaries come before col detail information. |
void |
setSummaryRowsBeforeDetail(boolean summaryBeforeDetail)
Sets whether row outline summaries come before row detail information. |
RangeRef |
setTabbedText(int row1,
int col1,
boolean valuesOnly,
java.lang.String text)
Places a block of tab-delimited text in a workbook. |
void |
setTabFont(java.lang.String name,
int height,
boolean bold,
boolean italic)
change the default tab font setting |
void |
setText(int sheet,
int row,
int col,
java.lang.String text)
Sets the value of the specified cell in the specified sheet. |
void |
setText(int row,
int col,
java.lang.String text)
Sets the value of the active cell for all selected sheets. |
void |
setText(java.lang.String text)
Sets the value of the active cell for all selected sheets. |
void |
setTextAntialiasing(boolean v)
|
void |
setTextAsValue(int sheet,
int row,
int col,
java.lang.String entry)
Sets the value of a specified cell on the specified worksheet This method allows you to enter information in a cell just as a user would enter information. |
void |
setTextAsValue(int row,
int col,
java.lang.String entry)
Sets the value of a specified cell of all selected worksheets. |
void |
setTextAsValue(java.lang.String entry)
Enters text in the active cell of all selected worksheets. |
void |
setTextAsValue(java.lang.String location,
java.lang.String entry)
Sets the value of a specified cell. |
void |
setTextSelection(int start,
int end)
Sets text selection for the selected cell |
void |
setTopRow(int topRow)
Sets the first row to display in this view. |
void |
setViewScale(int scale)
Sets the current display scale for a workbook |
void |
setWorkbookName(java.lang.String workbookName)
Sets the name assigned to the workbook associated with the current view. |
void |
setXMLStaxMode(boolean staxMode)
enable the xlsx/xlsm file parsing in the stax mode,default value is true |
void |
showActiveCell()
Positions the view to show the active cell if it is not currently displayed in the window. |
void |
showActiveTab()
|
int |
showConfirmDialog(java.lang.String message,
java.lang.String title,
int optiontype,
int messagetype)
|
void |
showError(java.lang.String errorMsg)
Displays an error message in a message box |
void |
showError(java.lang.Throwable throwable)
Displays an error message in a message box |
void |
sort(int row1,
int col1,
int row2,
int col2,
boolean sortByRows,
int[] keys)
Specifies a range of data to be sorted and the keys by which to sort the data. |
void |
sort3(int row1,
int col1,
int row2,
int col2,
boolean sortByRows,
int keys,
int key2,
int key3)
Specifies a range of data to be sorted and as many as three keys by which to sort the data. |
void |
startEdit(boolean clear,
boolean inCellEditFocus,
boolean arrowsExitEditMode)
Begins edit mode for the active cell. |
int |
suspendSheetProtection()
|
java.lang.String |
toCSV()
|
int |
twipsToCharWidth(int nTwips)
Converts twips (1/1440th of an inch) to character width based units. |
CellRef |
twipsToRC(int x,
int y)
Converts a point in a worksheet, as specified by a set of coordinates, to the corresponding row and column at which the point is located. |
void |
ungroupShapes()
|
void |
viewChanged(ViewEvent viewevent)
|
void |
write(java.io.OutputStream outputstream)
Saves the workbook to the specified output stream. |
void |
write(java.io.OutputStream outputstream,
java.lang.String password)
Saves the workbook to the specified output stream. |
void |
write(java.lang.String fileName)
Saves the workbook to a file. |
void |
write(java.lang.String path,
short type)
Saves the workbook to a file. |
void |
write(java.lang.String fileName,
java.lang.String password)
Saves the workbook to a file. |
void |
writeCSV(java.io.OutputStream outputstream)
Saves the workbook to the specified output stream. |
void |
writeCSV(java.lang.String fileName)
Saves the workbook to a file. |
byte[] |
writeToBlob()
Writes the workbook to a blob. |
void |
writeURL(java.lang.String logicalSpec,
short fileType)
Saves a workbook to the specified URL. |
void |
writeURL(java.net.URL url,
short fileType)
Saves a workbook to the specified URL. |
void |
writeXLSX(java.io.OutputStream outputStream)
write workbook to OutputStream in xlsx format. |
void |
writeXLSX(java.lang.String filename)
write workbook to specified excel file in xlsx format. |
Methods inherited from class java.awt.Panel |
---|
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short CANCEL
public static final short NO
public static final short OK
public static final short YES
public static final short CopyAll
public static final short CopyFormats
public static final short CopyFormulas
public static final short CopyValues
public static final short ClearDlg
public static final short ClearFormats
public static final short ClearCellValues
public static final short ClearAll
public static final short ShowAutomatic
public static final short ShowOff
public static final short ShowOn
public static final short SheetStateShown
public static final short SheetStateHidden
public static final short SheetStateVeryHidden
public static final short ShiftHorizontal
public static final short ShiftVertical
public static final short ShiftRows
public static final short ShiftColumns
public static final int sheetProtectionAllowNone
public static final int sheetProtectionAllowEditObjects
public static final int sheetProtectionAllowEditScenarios
public static final int sheetProtectionAllowFormatCells
public static final int sheetProtectionAllowFormatColumns
public static final int sheetProtectionAllowFormatRows
public static final int sheetProtectionAllowInsertColumns
public static final int sheetProtectionAllowInsertRows
public static final int sheetProtectionAllowInsertHyperlinks
public static final int sheetProtectionAllowDeleteColumns
public static final int sheetProtectionAllowDeleteRows
public static final int sheetProtectionAllowSelectLocked
public static final int sheetProtectionAllowSort
public static final int sheetProtectionAllowUseAutoFilter
public static final int sheetProtectionAllowUsePivotRanges
public static final int sheetProtectionAllowSelectUnlocked
public static final int sheetProtectionAllowDefault
public static final int sheetProtectionAllowLockedInCellEdit
public static final int sheetProtectionAllowLockedEditFocus
public static final int sheetProtectionAllowChangeLocked
public static final int sheetProtectionAllowChangeUnlocked
public static final int sheetProtectionAllowUseOutlining
public static final int sheetProtectionAllowEverything
public static final int bookProtectStructure
public static final int bookProtectWindow
public static final short TabsBottom
public static final short TabsOff
public static final short TabsTop
public static final short FileTabbedText
public static final short FileExcel97
public static final short FileXLSX
public static final short FileExcel2007
public static final short TypeEmpty
public static final short TypeNumber
public static final short TypeText
public static final short TypeLogical
public static final short TypeError
public static final short ColWidthUnitsNormal
public static final short ColWidthUnitsTwips
public static final long serialVersionUID
Constructor Detail |
---|
public View()
public View(java.util.Locale locale)
public View(View view)
public View(Book book1, Group group)
Method Detail |
---|
public void addCancelEditListener(CancelEditListener canceleditlistener)
canceleditlistener
- - the CancelEdit listener to be addedpublic void addColPageBreak(int rc) throws CellException
rc
- - indicates the column where the page break is added
CellException
- if argument is invalidpublic void addEndEditListener(EndEditListener endeditlistener)
endeditlistener
- - the EndEdit listener to be addedpublic void addEndRecalcListener(EndRecalcListener endrecalclistener)
endrecalclistener
- - the EndRecalc listener to be addedpublic void addHyperlinkListener(HyperlinkListener hyperlinklistener)
public void addStartCellModifyListener(CellModifyListener cellModifyListener)
public void addEndCellModifyListener(CellModifyListener cellModifyListener)
public void addModifiedListener(ModifiedListener modifiedlistener)
modifiedlistener
- - the Modified listener to be addedpublic GRObject addObject(short objectType, double x1, double y1, double x2, double y2) throws CellException
objectType
- one of the shorts below that identifies the type of object to add:
Object Type Parameters chart
eArc eOval eLine eRectangle
eButton eCheckBoxx1
- - coordinate of the first anchor point of the object. x1 is measured in columns from the left edge of the worksheet.y1
- - coordinate of the first anchor point of the object. y1 is measured in rows from the top edge of the worksheet.x2
- - coordinate of the second anchor point. x2 is measured in columns from the left edge of the worksheety2
- - coordinate of the second anchor point. y2 is measured in rows from the top edge of the worksheet.
CellException
- if a parameter is invalidpublic void addObjectListener(ObjectListener objectlistener)
objectlistener
- - the Object listener to be addedpublic void addPageBreak() throws CellException
CellException
- if the current selection is invalidpublic GRObject addPicture(double x1, double y1, double x2, double y2, java.lang.String fileName) throws CellException
x1
- - double that is the first of two coordinates that represent the first anchor point of the object. X1 is measured in columns from the left edge of the worksheety1
- - double that is the second of two coordinates that represent the first anchor point of the object. nY1 is measured in rows from the top edge of the worksheet.x2
- - double that is the first of two coordinates that represent the second anchor point of the object. x2 is measured in columns from the left edge of the worksheet.y2
- - double that is the second of two coordinates that represent the second anchor point of the object. y2 is measured in rows from the top edge of the worksheet.fileName
- filename that poins to a jpeg or gif picture.
CellException
- if a parameter is invalidpublic void addSelection(GRObject grobject)
grobject
- - the object to be added to the selection listpublic GRObject getFirstObject()
public GRObject getSelectedObject(int selection) throws CellException
selection
- - identifies the selected object by number
CellException
- if a parameter is invalidpublic void removeObject(GRObject grobject) throws CellException
grobject
- - an instance of GRObject
CellException
- if the object is not foundpublic int getSelectedObjectCount()
public RangeRef[] getMergedCells()
java.lang.Exception
- invalid argumentpublic void addRowPageBreak(int row) throws CellException
row
- - integer indicating the row where the page break is to be added
CellException
- if a parameter is invalidpublic void addSelection(int row1, int col1, int row2, int col2) throws CellException
row1
- - the beginning row coordinate of the selection to add to the selection list.col1
- - the beginning column coordinate of the selection.row2
- - the ending row coordinatecol2
- - the ending column coordinate
CellException
- if a parameter is invalidpublic void addSelectionChangedListener(SelectionChangedListener selectionchangedlistener)
selectionchangedlistener
- - the SelectionChanged listener to be addedpublic void addStartEditListener(StartEditListener starteditlistener)
starteditlistener
- - the StartEdit listener to be addedpublic void addStartRecalcListener(StartRecalcListener startrecalclistener)
startrecalclistener
- - the StartRecalc listener to be addedpublic void addUpdateListener(UpdateListener updatelistener)
updatelistener
- - the Update listener to be addedpublic void addValidationFailedListener(ValidationFailedListener validationfailedlistener)
validationfailedlistener
- - the ValidationFailed listener to be addedpublic void addViewChangedListener(ViewChangedListener viewchangedlistener)
viewchangedlistener
- - the ViewChanged listener to be addedpublic void attach(Book book)
book
- from which to get the workbook to attach topublic void cancelEdit()
public int charWidthToTwips(int nCharWidth)
nCharWidth
- - the column width in characters
public void checkRecalc()
public static int color2RGB(java.awt.Color color)
public void childIsActive()
public void clearRange(int row1, int col1, int row2, int col2, short clearType) throws CellException
row1
- - Coordinate specifying the beginning row of the range.col1
- - Coordinate specifying the beginning column of the range.row2
- - Coordinate specifying the ending row of the rangecol2
- - Coordinate specifying the ending column of the rangeclearType
- - Determines what is cleared, as followsClearAll
:
ClearFormats = 1 clears formats only
ClearValues = 2 clears values only (including formulas)
ClearAll = 7 clears values, formats, and objects
CellException
- if an invalid clearType value is specifiedpublic java.lang.Object clone()
clone
in class java.lang.Object
public void copyAll(View view) throws CellException
view
- - a handle to the source view
CellException
- if an error occurspublic void copyAllToBook(Book book) throws CellException
book
- the destination workbook
CellException
- if an error occurspublic void copyDataFromArray(int sheet, int row1, int col1, int row2, int col2, double[][] data) throws CellException
sheet
- - the sheet numberrow1
- - the coordinate specifying the beginning row to copy tocol1
- - the coordinate specifying the beginning column to copy torow2
- - the coordinate of the ending rowcol2
- - the coordinate of the ending columndata
- - a 2-dimensional array
CellException
- if an error occurspublic void copyDataToArray(int sheet, int row1, int col1, int row2, int col2, double[][] data) throws CellException
sheet
- - the sheet numberrow1
- - the coordinate specifying the beginning row to copy tocol1
- - the coordinate specifying the beginning column to copy torow2
- - the coordinate of the ending rowcol2
- - the coordinate of the ending columndata
- - a 2-dimensional array
CellException
- if an error occurspublic void copyRange(int dstSheet, int dstRow1, int dstCol1, int dstRow2, int dstCol2, View srcView, int srcSheet, int srcRow1, int srcCol1, int srcRow2, int srcCol2) throws CellException
dstSheet
- - an index identifying the destination worksheet. Do not confuse the index with the sheet name appearing on the sheet tab.dstRow1
- - the first row in the destination rangedstCol1
- - the first column in the destination rangedstRow2
- - the ending row in the destination rangedstCol2
- - the ending column in the destination rangesrcView
- - the handle to the source viewsrcSheet
- - an index identifying the worksheet in the source view.srcRow1
- - the first row in the source rangesrcCol1
- - the first column in the source rangesrcRow2
- - the ending row in the source rangesrcCol2
- - the ending column in the source range
CellException
- if a parameter is invalidpublic void copyRange(int dstSheet, int dstRow1, int dstCol1, int dstRow2, int dstCol2, View srcView, int srcSheet, int srcRow1, int srcCol1, int srcRow2, int srcCol2, short what) throws CellException
dstSheet
- - an index identifying the destination worksheet. Do not confuse the index with the sheet name appearing on the sheet tab.dstRow1
- - the first row in the destination rangedstCol1
- - the first column in the destination rangedstRow2
- - the ending row in the destination rangedstCol2
- - the ending column in the destination rangesrcView
- - the handle to the source viewsrcSheet
- - an index identifying the worksheet in the source view.srcRow1
- - the first row in the source rangesrcCol1
- - the first column in the source rangesrcRow2
- - the ending row in the source rangesrcCol2
- - the ending column in the source rangewhat
- - the type of copy operation, using one or more of the following constantsCopyAll
:
CopyFormulas = 1 CopyValues = 2 CopyFormats = 4 CopyAll = 7
CellException
- if a parameter is invalidpublic void copyRange(int dstRow1, int dstCol1, int dstRow2, int dstCol2, View srcView, int srcRow1, int srcCol1, int srcRow2, int srcCol2) throws CellException
dstRow1
- - the first row in the destination rangedstCol1
- - the first column in the destination rangedstRow2
- - the ending row in the destination rangedstCol2
- - the ending column in the destination rangesrcView
- - the handle to the source viewsrcRow1
- - the first row in the source rangesrcCol1
- - the first column in the source rangesrcRow2
- - the ending row in the source rangesrcCol2
- - the ending column in the source range
CellException
- if a parameter is invalidpublic void copyRange(int dstRow1, int dstCol1, int dstRow2, int dstCol2, View srcView, int srcRow1, int srcCol1, int srcRow2, int srcCol2, short what) throws CellException
dstRow1
- - the first row in the destination rangedstCol1
- - the first column in the destination rangedstRow2
- - the ending row in the destination rangedstCol2
- - the ending column in the destination rangesrcView
- - the handle to the source viewsrcRow1
- - the first row in the source rangesrcCol1
- - the first column in the source rangesrcRow2
- - the ending row in the source rangesrcCol2
- - the ending column in the source rangewhat
- - the type of copy operation, using one or more of the following constantsCopyAll
:
CopyFormulas = 1 CopyValues = 2 CopyFormats = 4 CopyAll = 7
CellException
- if a parameter is invalidpublic void deleteAutoFillItems(int index) throws CellException
index
- - identifies the list's position within all defined autofill lists. The first list has an index of 1.
CellException
- if a parameter is invalidpublic void deleteDefinedName(java.lang.String name) throws CellException
name
- - identifies the user-defined name to delete
CellException
- if a parameter is invalidpublic void deleteRange(int row1, int col1, int row2, int col2, short shiftType) throws CellException
row1
- - Coordinate of the beginning row of the range to deletecol1
- - Coordinate of the beginning column of the rangerow2
- - Coordinate of the ending row of the rangecol2
- - Coordinate of the ending column of the rangeshiftType
- - Constants determining how the delete should occur:
ShiftHorizontal = 1
ShiftVertical = 2
shiftRows = 3
ShiftColumns = 4
CellException
- if a parameter is invalidpublic void deleteSheets(int sheet, int sheets) throws CellException
sheet
- - specifies the index to the first worksheet to be deleted. Do not confuse the index with the sheet name on the sheet tab.sheets
- - specifies how many sheets to delete, beginning with the worksheet specified by sheet.
CellException
- if a parameter is invalidpublic void destroy()
public void addUIListener(UIListener uilistener)
public void draw(java.awt.Graphics g1, int x, int y, int cx, int cy, int nRow, int nCol, int[] rows, int[] cols, int nFixedR1, int nFixedRows, int nFixedC1, int nFixedCols) throws CellException
g1
- - handle to a device context specifying where the workbook is drawnx
- - column coordinate of the upper left corner of the drawn workbooky
- - row coordinate of the upper left corner of the drawn workbookcx
- - width of the drawn workbookcy
- - height of the drawn workbooknRow
- - beginning row in the workbook to be drawnnCol
- - beginning column in the workbook to be drawnrows
- - the number of rows to be drawncols
- - the number of columns to be drawnnFixedR1
- - beginning fixed row of the drawn worksheetnFixedRows
- - number of rows to fix in the drawn worksheetnFixedC1
- - beginning fixed column in the drawn worksheetnFixedCols
- - number of columns to fix in the drawn worksheet
CellException
- if a parameter is invalidpublic void editClear(short clearType) throws CellException
clearType
- - A constant specifying what is clearedClearAll
:
ClearDlg = 0
ClearFormats = 1
ClearValues = 2
ClearAll = 3
CellException
- if a parameter is invalidpublic void editCopy() throws CellException
CellException
- if an error occurspublic void editCopyDown() throws CellException
CellException
- if an error occurspublic void editCopyRight() throws CellException
CellException
- if an error occurspublic void editCut() throws CellException
CellException
- if an error occurspublic void editDelete(short shift) throws CellException
shift
- - A constant that determines how the deletion should occur.
ShiftHorizontal = 1
ShiftVertical = 2
ShiftRows = 3
ShiftColumns = 4
CellException
- if a parameter is invalidpublic void editDeleteSheets() throws CellException
CellException
- if an error occurspublic void editInsert(short shift) throws CellException
shift
- - A constant that determines how the insertion should occur.
ShiftHorizontal = 1
ShiftVertical = 2
ShiftRows = 3
ShiftColumns = 4
FixupAppend = 32
FixupNormal = 0
FixupPrepend = 16
CellException
- if protection is enabled or if more than one range is selectedpublic void editInsertSheets() throws CellException
CellException
- if an error occurspublic void editPaste() throws CellException
CellException
- if an error occurspublic void editPaste(short what) throws CellException
what
- - what to paste, represented as one or more of the following constantsCopyAll
:
CopyFormulas = 1
CopyValues = 2
CopyFormats = 4
CopyAll = 7
CellException
- if a parameter is invalidpublic void editPasteSpecial(short what) throws CellException
what
- - what to paste, represented as one or more of the following constantsCopyAll
:
CopyFormulas = 1
CopyValues = 2
CopyFormats = 4
CopyAll = 7
CellException
- if a parameter is invalidpublic void endEdit() throws CellException
CellException
- if an error occurspublic void setErrorText(int errNo, java.lang.String errText) throws CellException
errNo
- - error numbererrText
- - error Text
CellException
- if error not in 0-50public java.lang.String errorNumberToText(int error) throws CellException
error
- - a jxcell error number
CellException
- if error not in 0-50public void setCustomMessage(int msgNo, java.lang.String text) throws CellException
msgNo
- message indextext
- content
CellException
- exceptionpublic void exportPDF(java.lang.String fileName) throws CellException, java.io.IOException
fileName
- file name
java.lang.Exception
- exception
CellException
java.io.IOException
public void exportPDF(java.io.OutputStream outputstream, boolean sheetOnly) throws CellException
CellException
public void exportPDF(java.io.OutputStream outputstream) throws CellException
outputstream
- outputstream
java.lang.Exception
- exception
CellException
public void filePrint(boolean showPrintDlg) throws CellException
showPrintDlg
- - sets the show print dialog flag. If this flag is true, the Print dialog box is displayed before printing.
CellException
public void filePrint(boolean flag, java.lang.Object obj) throws CellException
CellException
public FindReplaceInfo findFirst(int sheet1, int row1, int col1, int sheet2, int row2, int col2, java.lang.String findWhat, int flags) throws CellException
sheet1
- - the first sheet to searchrow1
- - the first row to search.col1
- - the first column to search.sheet2
- - the last sheet to searchrow2
- - the last row to search.col2
- - the last col to search.findWhat
- - the text to search for.flags
- - one or more of the following search flags FindReplaceInfo.kMatchCase FindReplaceInfo.kMatchEntireCells FindReplaceInfo.kByRows FindReplaceInfo.kByColumns FindReplaceInfo.kInValues FindReplaceInfo.kInFormulas FindReplaceInfo.kReplaceAll
CellException
- if any arguments are invalidpublic FindReplaceInfo findFirst(int row1, int col1, int row2, int col2, java.lang.String findWhat, int flags) throws CellException
row1
- - the first row to search.col1
- - the first column to search.row2
- - the last row to search.col2
- - the last col to search.findWhat
- - the text to search for.flags
- - one or more of the following search flags: FindReplaceInfo.kMatchCase to match case exactly.
FindReplaceInfo.kMatchEntireCells to only return cells whose entire contents match findWhat.
FindReplaceInfo.kByRows to search by rows and then by columns (default).
FindReplaceInfo.kByColumns to search by columns and then by rows.
This option is slower than FindReplaceInfo.kByRows.
FindReplaceInfo.kInValues to search values (default). FindReplaceInfo.kInFormulas to search formulas.
FindReplaceInfo.kReplaceAll to replace for all occurrences (replace only).
CellException
- if any arguments are invalidpublic FindReplaceInfo findFirst(java.lang.String findWhat, int flags) throws CellException
findWhat
- - the text to search forflags
- - one or more of the following search flags FindReplaceInfo.kMatchCase FindReplaceInfo.kMatchEntireCells FindReplaceInfo.kByRows FindReplaceInfo.kByColumns FindReplaceInfo.kInValues FindReplaceInfo.kInFormulas FindReplaceInfo.kReplaceAll
CellException
- if any arguments are invalidpublic FindReplaceInfo findNext(java.lang.String findWhat, int flags) throws CellException
findWhat
- - the text to search forflags
- - one or more of the following search flags FindReplaceInfo.kMatchCase FindReplaceInfo.kMatchEntireCells FindReplaceInfo.kByRows FindReplaceInfo.kByColumns FindReplaceInfo.kInValues FindReplaceInfo.kInFormulas FindReplaceInfo.kReplaceAll
CellException
- if any arguments are invalidpublic FindReplaceInfo findNext(java.lang.String findWhat, int flags, FindReplaceInfo findreplaceinfo)
findWhat
- - the text to search forflags
- - one or more of the following search flags FindReplaceInfo.kMatchCase FindReplaceInfo.kMatchEntireCells FindReplaceInfo.kByRows FindReplaceInfo.kByColumns FindReplaceInfo.kInValues FindReplaceInfo.kInFormulas FindReplaceInfo.kReplaceAllfindreplaceinfo
- - a FindReplaceInfo object
public void flushModifiedEvents()
public java.lang.String formatRCNr(int row1, int col1, int row2, int col2, boolean doAbsolute) throws CellException
row1
- - the start row number of the referencecol1
- - the start column number of the referencerow2
- - the end row number of the referencecol2
- - the end column number of the referencedoAbsolute
- - if True, uses absolute references. If False, uses relative references
CellException
public java.lang.String formatRCNr(int row, int col, boolean doAbsolute) throws CellException
row
- - the row number of the referencecol
- - the column number of the referencedoAbsolute
- - if True, uses absolute references. If False, uses relative references
CellException
public RangeRef formulaToRangeRef(java.lang.String formula) throws CellException
formula
- - a string containing a range reference formula, such as "A1:D8".
CellException
public RangeRef formulaToRangeRefLocal(java.lang.String formula) throws CellException
formula
- - a string containing a range reference formula, such as "A1:D8".
CellException
public CellRef getActiveCell() throws CellException
CellException
public int getActiveCol()
public int getActiveRow()
public java.lang.String getAutoFillItems(int index) throws CellException
index
- - identifies the list's position with all defined autofill lists. The first autofill item has an index of 1.
CellException
public int getAutoFillItemsCount()
public java.awt.Color getBackGroundColor()
public int getBackColorIndex()
public CellFormat getCellFormat()
public CellFormat getCellFormat(int row1, int col1, int row2, int col2) throws CellException
row1
- - the first row in the rangecol1
- - the first column in the rangerow2
- - the ending row in the rangecol2
- - the ending column in the range
CellException
public CellFormat getCellFormat(int sheet1, int row1, int col1, int sheet2, int row2, int col2) throws CellException
sheet1
- - the beginning sheetrow1
- - the first row in the rangecol1
- - the first column in the rangesheet2
- - the ending sheetrow2
- - the ending row in the rangecol2
- - the ending column in the range
CellException
public void getCellFormat(CellFormat cellformat)
cellformat
- - a CellFormat objectpublic void getCellFormat(CellFormat cellformat, int row1, int col1, int row2, int col2) throws CellException
cellformat
- - a CellFormat objectrow1
- - the first row in the rangecol1
- - the first column in the rangerow2
- - the ending row in the rangecol2
- - the ending column in the range
CellException
public void getCellFormat(CellFormat cellformat, int sheet1, int row1, int col1, int sheet2, int row2, int col2) throws CellException
cellformat
- - a CellFormat objectsheet1
- - the beginning sheetrow1
- - the first row in the rangecol1
- - the first column in the rangesheet2
- - the ending sheetrow2
- - the ending row in the rangecol2
- - the ending column in the range
CellException
public java.lang.String getClip() throws CellException
CellException
public java.lang.String getClipValues() throws CellException
CellException
public static java.awt.datatransfer.Clipboard getClipboard()
public int getCol() throws CellException
CellException
public java.lang.String getColText(int col) throws CellException
col
- - identifies a column by number
CellException
public int getColWidth(int col) throws CellException
col
- - identifies a column by number
CellException
public int getColWidthTwips(int col) throws CellException
col
- - identifies a column by number
CellException
public short getColWidthUnits()
ColWidthUnitsNormal
= 0 ColWidthUnitsTwipsColWidthUnitsTwips
= 1public int getDefaultColWidth()
public void setColOutlineLevel(int col1, int col2, int outlineLevel, boolean additive) throws CellException
col1
- the first column in the range.col2
- the last column in the range.outlineLevel
- the outline level to set.additive
- Specifies whether the outline level is an absolute value to set, or should be added to the current outline level.
if this value is false, the outline level of the specified columns will be set to outlineLevel.
Otherwise, outlineLevel will be added to the current outline level of each column.
Note: The outline level may be set from zero to seven.
java.lang.Exception
- exception
CellException
public int getColOutlineLevel(int col) throws CellException
col
- identifies a column by number. Columns are indexed from left to right beginning at 0.
java.lang.Exception
- exception
CellException
public void setSummaryColsBeforeDetail(boolean summaryBeforeDetail)
summaryBeforeDetail
- if true, col outline summaries are displayed before col detail information.public boolean isSummaryColsBeforeDetail()
public java.lang.String getDefaultFontName()
public int getDefaultFontSize()
public int getDefaultRowHeight()
public java.lang.String getDefinedName(int name) throws CellException
name
- - identifies a name by index number.
Defined names are numbered in the order in which they are created, beginning with 1.
CellException
- if an invalid index number is specifiedpublic boolean isHiddenDefinedName(int name) throws CellException
CellException
public java.lang.String getDefinedName(java.lang.String name) throws CellException
name
- - a defined name
CellException
- if the specified name does not existpublic int getDefinedNameCount()
public java.lang.String getDefinedNameLocal(java.lang.String name) throws CellException
name
- - a defined name in the user's language
CellException
public java.lang.String getEntry() throws CellException
CellException
public java.lang.String getEntry(int row, int col) throws CellException
row
- - the row numbercol
- - the column number
CellException
public java.lang.String getEntry(int sheet, int row, int col) throws CellException
sheet
- - the index number of the sheet in which the cell residesrow
- - the row numbercol
- - the column number
CellException
public java.lang.String getEntry(java.lang.String location) throws CellException
location
- a defined name or a reference that identifies a cell.
CellException
- when an exception occurspublic java.awt.Color getExtraColor()
public int getExtraColorIndex()
public java.lang.String getFileName()
public NumberFormat getFirstNumberFormat() throws CellException
CellException
public int getFixedCol()
public int getFixedCols()
public int getFixedRow()
public int getFixedRows()
public java.lang.String getFormattedText() throws CellException
CellException
- when an exception occurspublic java.lang.String getFormattedText(int row, int col) throws CellException
row
- - the row number of the cell from which the text is returnedcol
- - the column number of the cell from which the text is returned
CellException
public java.lang.String getFormattedText(int sheet, int row, int col) throws CellException
sheet
- - the worksheet number from which the text is returnedrow
- - the row number of the cell from which the text is returnedcol
- - the column number of the cell from which the text is returned
CellException
public java.lang.String getFormula() throws CellException
CellException
- if there is no active cell.public java.lang.String getFormula(int row, int col) throws CellException
row
- - the row number of the cellcol
- - the column number of the cell
CellException
public java.lang.String getFormula(int sheetnum, int row, int col) throws CellException
sheetnum
- - the sheet numberrow
- - the row number of the cellcol
- - the column number of the cell
CellException
public java.lang.String getFormulaLocal() throws CellException
CellException
public java.lang.String getFormulaLocal(int row, int col) throws CellException
row
- - the row number of the cellcol
- - the column number of the cell
CellException
public java.lang.String getFormulaLocal(int sheetnum, int row, int col) throws CellException
sheetnum
- - the sheet numberrow
- - the row number of the cellcol
- - the column number of the cell
CellException
public java.lang.String getGroup()
public int getHeaderHeight()
public int getHeaderWidth()
public int getIterationMax()
public double getIterationMaxChange()
public int getLastCol()
public int getLastColForRow(int rownum) throws CellException
rownum
- - the specified row
CellException
- if a parameter is invalidpublic int getLastRow()
public int getLeftCol() throws CellException
CellException
- is the view is not visiblepublic void getLock()
public int getMaxCol()
public int getMaxRow()
public int getMinCol()
public int getMinRow()
public short getMode()
public int getNextColPageBreak(int col) throws CellException
col
- - the starting column
CellException
public NumberFormat getNextNumberFormat(NumberFormat numberformat) throws CellException
CellException
public int getNextRowPageBreak(int row) throws CellException
row
- - the starting row
CellException
public double getNumber() throws CellException
CellException
public double getNumber(int row, int col) throws CellException
row
- - the row coordinatecol
- - the column coordinate
CellException
public double getNumber(int sheet, int row, int col) throws CellException
sheet
- - the specified sheetrow
- - the row coordinatecol
- - the column coordinate
CellException
public java.awt.Color getPaletteEntry(int entry) throws CellException
entry
- - Zero-based index of the entry to change. jxcell presents a color palette with 56 color entries.
CellException
- if a parameter is invalidpublic javax.swing.JFrame getParentFrame()
public short getPolyEditMode()
public java.lang.String getPrintArea() throws CellException
CellException
public java.lang.String getPrintAreaLocal() throws CellException
CellException
public double getPrintBottomMargin()
public java.lang.String getPrintFooter()
public double getPrintFooterMargin()
public java.lang.String getPrintHeader()
public double getPrintHeaderMargin()
public double getPrintLeftMargin()
public double getPrintRightMargin()
public int getPrintScale()
public int getPrintScaleFitHPages()
public int getPrintScaleFitVPages()
public java.lang.String getPrintTitles() throws CellException
CellException
public java.lang.String getPrintTitlesLocal() throws CellException
CellException
public double getPrintTopMargin()
public int getRow() throws CellException
CellException
public int getRowHeight(int row) throws CellException
row
- - the row number
CellException
public int getSelEndCol() throws CellException
CellException
public int getSelEndRow() throws CellException
CellException
public int getSelStartCol() throws CellException
CellException
- if there are no ranges selectedpublic int getSelStartRow() throws CellException
CellException
- if there are no ranges selectedpublic RangeRef getSelection() throws CellException
CellException
public RangeRef getSelection(int i) throws CellException
CellException
public int getSelectionCount()
public java.lang.String getSelectionLocal()
public int getSheet()
public java.lang.String getSheetName(int sheet) throws CellException
sheet
- - identifies the worksheet by number
CellException
- exceptionpublic void copySheet(int insertAt) throws java.lang.Exception
insertAt
- The location at which to insert the new sheets.
java.lang.Exception
- if insertAt is not a valid sheet index.public int getSheetHiddenState()
SheetStateShown
show the sheet.
SheetStateHiddenSheetStateHidden
hide the sheet.
SheetStateVeryHiddenSheetStateVeryHidden
hide the sheet and can not reshow the sheet with the GUI.public void setSheetHidden(int hidden) throws CellException
hidden
- one of the following flags indicating the desired hidden state:
SheetStateShownSheetStateShown
show the sheet.
SheetStateHiddenSheetStateHidden
hide the sheet.
SheetStateVeryHiddenSheetStateVeryHidden
hide the sheet and can not reshow the sheet with the GUI.
java.lang.Exception
- if this call would hide the last visible sheet or if the book is protected.
CellException
public short getShowHScrollBar()
public short getShowTabs()
public short getShowVScrollBar()
public java.lang.String getTabbedText(int row1, int col1, int row2, int col2, boolean valuesOnly) throws CellException
row1
- - the beginning row for the rangecol1
- - the beginning column for the rangerow2
- - the ending row for the rangecol2
- - the ending column for the rangevaluesOnly
- - true if text is unformatted, false if text is formatted
CellException
public java.lang.String getText() throws CellException
CellException
- if there is no active cellpublic java.lang.String getText(int row, int col) throws CellException
row
- - identifies the cell row by numbercol
- - identifies the cell column by number
CellException
public java.lang.String getText(int sheet, int row, int col) throws CellException
sheet
- - identifies the worksheet by numberrow
- - identifies the cell row by numbercol
- - identifies the cell column by number
CellException
public int getTopRow() throws CellException
CellException
- if the view is not visiblepublic short getType() throws CellException
CellException
public short getType(int row, int col) throws CellException
row
- - identifies the cell row by numbercol
- - identifies the cell column by number
CellException
public short getType(int sheet, int row, int col) throws CellException
sheet
- - identifies the worksheet by numberrow
- - identifies the cell row by numbercol
- - identifies the cell column by number
CellException
public int getViewScale()
public void setViewScale(int scale) throws CellException
scale
- - an integer ranging from 10 to 400. 100 percent is normal display.
CellException
- if the argument is invalidpublic java.lang.String getWorkbookName()
public void initWorkbook() throws CellException, java.lang.OutOfMemoryError
CellException
java.lang.OutOfMemoryError
public void insertRange(int row1, int col1, int row2, int col2, short shifttype) throws CellException
row1
- - range starting rowcol1
- - range starting columnrow2
- - range ending rowcol2
- - range ending columnshifttype
- - determines how the range cells should be shifted:
ShiftHorizontal = 1;
ShiftVertical = 2;
ShiftRows = 3;
ShiftColumns = 4;
CellException
public void insertSheets(int sheet, int sheets) throws CellException
sheet
- - identifies the index of the worksheet in front of which you want to insert the new sheets
Sheets are indexed from left to right beginning with 0. Do not confuse the index with the sheet name that appears on the sheet tab.sheets
- - determines how many sheets are inserted before sheet
CellException
public boolean isAllowAutoFill()
public boolean isAllowDelete()
public boolean isAllowEditHeaders()
public boolean isAllowCellTextDlg()
public boolean isAllowFillRange()
public boolean isAllowFormulas()
public boolean isAllowInCellEditing()
public boolean isAllowMoveRange()
public boolean isAllowSelections()
public boolean isAutoRecalc()
public boolean isBorder()
public boolean isCanEditPaste()
public boolean isCanEditPasteSpecial()
public boolean isColHeaderSelected()
public boolean isColHidden(int col) throws CellException
col
- - identifies a column by number, columns are indexed from left to right beginning at 0
CellException
- if a parameter is invalidpublic boolean isDefaultRowHeightAutomatic()
public boolean isEnableProtection()
public void setEnableProtection(boolean enableProtection)
enableProtection
- - true if protection is enabled, false otherwisepublic boolean isSheetProtected(int sheet) throws CellException
sheet
- the number of the sheet
java.lang.Exception
- exception
CellException
public void setSheetProtected(int sheet, boolean bProtected, java.lang.String password) throws CellException
sheet
- the number of the sheetbProtected
- true = protection enabledpassword
- The protection password,this may be null if no password is to be used.
java.lang.Exception
- exception
CellException
public void setBookProtection(boolean bProtected, int protect, java.lang.String password) throws CellException
bProtected
- whether protection is to be enabled.protect
- book protection options,one or more of the following:bookProtectStructurebookProtectStructure
,bookProtectWindowbookProtectWindow
password
- The protection password. this may be null if no password is to be used.
java.lang.Exception
- exception
CellException
public void setSheetProtected(int sheet, int protect, java.lang.String password) throws CellException
sheet
- the number of the sheetprotect
- sheet protection options; sheetProtectionAllowNone if nothing allowed,or one or more of the following:
sheetProtectionAllowNonesheetProtectionAllowNone
,sheetProtectionAllowEditObjects,sheetProtectionAllowEditScenarios
sheetProtectionAllowFormatCells,sheetProtectionAllowFormatColumns,sheetProtectionAllowFormatRows
sheetProtectionAllowInsertColumns,sheetProtectionAllowInsertRows,sheetProtectionAllowInsertHyperlinks
sheetProtectionAllowDeleteColumns,sheetProtectionAllowDeleteRows,sheetProtectionAllowSelectLocked
sheetProtectionAllowSort,sheetProtectionAllowUseAutoFilter,sheetProtectionAllowUsePivotRanges
sheetProtectionAllowSelectUnlocked,sheetProtectionAllowDefault,sheetProtectionAllowLockedInCellEdit
sheetProtectionAllowLockedEditFocus,sheetProtectionAllowChangeLocked,sheetProtectionAllowChangeUnlocked
sheetProtectionAllowUseOutlining,sheetProtectionAllowEverythingsheetProtectionAllowEverything
password
- The protection password,this may be null if no password is to be used.
java.lang.Exception
- exception
CellException
public int suspendSheetProtection()
public void resumeSheetProtection(long l)
public boolean isFormatPaintMode()
public boolean isIterationEnabled()
public boolean isLogical() throws CellException
CellException
public boolean isLogical(int row, int col) throws CellException
row
- - identifies the row by numbercol
- - identifies the column by number
CellException
public boolean isLogical(int nSheet, int nRow, int nCol) throws CellException
nSheet
- - identifies the sheet by numbernRow
- - identifies the row by numbernCol
- - identifies the column by number
CellException
public boolean isPrecisionAsDisplayed()
public boolean isPrintColHeading()
public boolean isPrintGridLines()
public boolean isPrintHCenter()
public boolean isPrintLandscape()
public boolean isPrintLeftToRight()
public boolean isPrintNoColor()
public boolean isPrintRowHeading()
public boolean isPrintScaleFitToPage()
public boolean isPrintVCenter()
public boolean isRepainting()
public boolean isRowHeaderSelected()
public boolean isRowHeightAutomatic(int row) throws CellException
row
- - identifies the row by number
CellException
- if a parameter is invalidpublic boolean isRowHidden(int row) throws CellException
row
- - identifies the row by number
CellException
public boolean isScrollToLastRC()
public boolean isSheetSelected(int sheet) throws CellException
sheet
- - identifies the worksheet by number
CellException
- if a parameter is invalidpublic boolean isShowColHeading()
public boolean isShowEditBar()
public boolean isShowEditBarCellRef()
public boolean isShowFormulas()
public boolean isShowGridLines()
public boolean isShowRowHeading()
public boolean isShowTypeMarkers()
public boolean isShowZeroValues()
public boolean isTopLeftHeaderSelected()
public int messageBox(java.lang.String message, java.lang.String caption, short type)
message
- - the text displayed in the message boxcaption
- - text displayed in the title bar of the message boxtype
- - the sum of values specifying the number and type of buttons to display in the message box
public void moveRange(int row1, int col1, int row2, int col2, int rowOffset, int colOffset) throws CellException
row1
- - specifies the start row of the source rangecol1
- - specifies the start column of the source rangerow2
- - specifies the end row of the source rangecol2
- - specifies the end column of the source rangerowOffset
- - specifies the offset of the destination start row from the start rowcolOffset
- - specifies the offset of the destination start column from the start column
CellException
public void objectBringToFront()
public short objectPosToPixels(double x1, double y1, double x2, double y2, java.awt.Rectangle rectangle) throws CellException
x1
- - number of columns from the left edge of the worksheet to where the left edge of the object is placed.y1
- - number of rows from the top edge of the worksheet to where the top of the object is placed.x2
- - number of columns from the left edge of the worksheet to where the right edge of the object is placed.y2
- - number of rows from the top edge of the worksheet to where the bottom of the object is placed.
CellException
public short objectPosToTwips(double x1, double y1, double x2, double y2, java.awt.Rectangle rectangle) throws CellException
x1
- - number of columns from the left edge of the worksheet to where the left edge of the object is placed.y1
- - number of rows from the top edge of the worksheet to where the top of the object is placed.x2
- - number of columns from the left edge of the worksheet to where the right edge of the object is placed.y2
- - number of rows from the top edge of the worksheet to where the bottom of the object is placed.
CellException
public void objectSendToBack()
public short rangeToPixels(int row1, int col1, int row2, int col2, java.awt.Rectangle rectangle) throws CellException
row1
- - the beginning row of the rangecol1
- - the beginning column of the rangerow2
- - the ending row of the rangecol2
- - the ending column of the range
CellException
public short rangeToTwips(int row1, int col1, int row2, int col2, java.awt.Rectangle rectangle) throws CellException
row1
- - the beginning row of the rangecol1
- - the beginning column of the rangerow2
- - the ending row of the rangecol2
- - the ending column of the range
CellException
public void readXLSX(java.lang.String filename) throws java.io.IOException, CellException
filename
- - the path and filename of the excel xlsx file
java.lang.Exception
- exception
java.io.IOException
CellException
public void readXLSX(java.io.InputStream in) throws java.io.IOException, CellException
in
- - the xlsx file inputstream
java.lang.Exception
- exception
java.io.IOException
CellException
public void writeXLSX(java.lang.String filename) throws java.io.IOException, CellException
filename
- - the path and filename of the excel xlsx file
java.lang.Exception
- exception
java.io.IOException
CellException
public void writeXLSX(java.io.OutputStream outputStream) throws java.io.IOException, CellException
outputStream
- - the OutputStream
java.lang.Exception
- exception
java.io.IOException
CellException
public void setCSVString(java.lang.String csv) throws CellException
CellException
public short read(java.io.InputStream inputstream) throws java.io.IOException, CellException
inputstream
- - an input stream
CellException
java.io.IOException
public short read(java.io.InputStream inputstream, java.lang.String pass) throws java.io.IOException, CellException
inputstream
- - an input streampass
- - pass
CellException
java.io.IOException
public short read(java.lang.String filename) throws java.io.IOException, CellException
filename
- - the path and filename of the worksheet or workbook
CellException
java.io.IOException
public short read(java.lang.String filename, java.lang.String pass) throws java.io.IOException, CellException
filename
- - the path and filename of the worksheet or workbookpass
- - pass
CellException
java.io.IOException
public short readFromBlob(byte[] blob) throws CellException, java.io.IOException
blob
- - reference to a byte array
CellException
- if an error occurs reading the file
java.io.IOException
- if an IO error occurspublic short readURL(java.lang.String spec) throws java.io.IOException, CellException
spec
- - the string containing the URL address
CellException
java.io.IOException
public short readURL(java.net.URL url) throws java.io.IOException, CellException
java.io.IOException
CellException
public short readURL(java.lang.String url, java.lang.String password) throws java.io.IOException, CellException
url
- the string containing the URL address.password
- The password to use when opening a password-protected file.
java.lang.Exception
- if invalid URL or IO exceptions
java.io.IOException
CellException
public void recalc() throws CellException
CellException
public void recalcAll() throws CellException
CellException
public void releaseLock()
public void removeCancelEditListener(CancelEditListener canceleditlistener)
canceleditlistener
- - the CancelEdit listener to be removedpublic void removeColPageBreak(int col) throws CellException
col
- - identifies the current column where the page break is removed.
CellException
public void removeEndEditListener(EndEditListener endeditlistener)
endeditlistener
- - the EndEdit listener to be removedpublic void removeEndRecalcListener(EndRecalcListener endrecalclistener)
endrecalclistener
- - the EndRecalc listener to be removedpublic void removeHyperlinkListener(HyperlinkListener hyperlinklistener)
public void removeStartCellModifyListener(CellModifyListener cellModifyListener)
public void removeEndCellModifyListener(CellModifyListener cellModifyListener)
public void removeModifiedListener(ModifiedListener modifiedlistener)
modifiedlistener
- - the Modified listener to be removedpublic void removeObjectListener(ObjectListener objectlistener)
objectlistener
- - the Object listener to be removedpublic void removePageBreak() throws CellException
CellException
public void removeRowPageBreak(int row) throws CellException
row
- - row where the page break is removed
CellException
public void removeSelectionChangedListener(SelectionChangedListener selectionchangedlistener)
selectionchangedlistener
- - the SelectionChanged listener to be removedpublic void removeStartEditListener(StartEditListener starteditlistener)
starteditlistener
- - the StartEdit listener to be removedpublic void removeStartRecalcListener(StartRecalcListener startrecalclistener)
startrecalclistener
- - the StartRecalc listener to be removedpublic void removeUpdateListener(UpdateListener updatelistener)
updatelistener
- - the Update listener to be removedpublic void removeValidationFailedListener(ValidationFailedListener validationfailedlistener)
validationfailedlistener
- - the ValidationFailed listener to be removedpublic void removeViewChangedListener(ViewChangedListener viewchangedlistener)
viewchangedlistener
- - the ViewChanged listener to be removedpublic boolean replace(java.lang.String findWhat, java.lang.String replaceWith, int flags, FindReplaceInfo findreplaceinfo) throws CellException
findWhat
- - the search stringreplaceWith
- - the replace stringflags
- - one or more of the following search flags: FindReplaceInfo.kMatchCase to match case exactly. FindReplaceInfo.kMatchEntireCells to only return cells whose entire contents match findWhat. FindReplaceInfo.kByRows to search by rows and then by columns (default). FindReplaceInfo.kByColumns to search by columns and then by rows. This option is slower than FindReplaceInfo.kByRows. FindReplaceInfo.kInValues to search values (default). FindReplaceInfo.kInFormulas to search formulas. FindReplaceInfo.kReplaceAll to replace for all occurrences (replace only).findreplaceinfo
- - an instance of FindReplaceInfo
CellException
public static java.awt.Color rgb2Color(int iRgb)
iRgb
- the Integer RGB(0x00rrggbb) to convert
public void saveWindowInfo()
public void showActiveTab()
public void setActiveCell(int row, int col) throws CellException
row
- - the active cell row coordinatecol
- - the active cell column coordinate
CellException
public void setAllowAutoFill(boolean allowAutoFill)
allowAutoFill
- - true if autofill is enabled.public void setAllowDelete(boolean allowDelete)
allowDelete
- - true if the delete key clears selections.public void setAllowEditHeaders(boolean allowEditHeaders)
allowEditHeaders
- - true if row, column and top left headers can be edited, false, otherwise
You can edit the names displayed in row, column, and top left headers by double-clicking a header. This displays the Header Name dialog box, which allows you to enter a new header name.public void setAllowCellTextDlg(boolean allowCellTextDlg)
public void setAllowFillRange(boolean allowFillRange)
allowFillRange
- - true if the user will be allowed to fill a range by clicking and dragging with the mousepublic void setAllowFormulas(boolean allowFormulas)
allowFormulas
- - true if the user will be allowed to enter and edit formulas, false otherwisepublic void setAllowInCellEditing(boolean allowInCellEditing)
allowInCellEditing
- - true if cells are to be edited in place, false otherwisepublic void setAllowMoveRange(boolean allowMoveRange)
allowMoveRange
- - true if the user will be allowed to move a range by clicking and dragging with the mousepublic void setAllowSelections(boolean allowSelections)
allowSelections
- - true if the user is allowed to change selections with the keyboard or mouse, false otherwisepublic void setAutoFillItems(int index, java.lang.String items) throws CellException
index
- - identifies the list's position within all defined autofill lists
The first autofill list has an index of zero.items
- - the list of autofill items
Autofill lists are frequently used series of text such as months and days of the week. When you enter a text value from an autofill list and move one cell down or to the right, the next text value in the list is proposed for that cell. You can also use the fill handle to autofill a single row or column
CellException
public void setAutoRecalc(boolean autoRecalc)
autoRecalc
- - true if the workbook should recalculate in the background, automatically, false otherwisepublic void setBackGroundColor(java.awt.Color color)
color
- - the new background color in the form 0x00rrggbbpublic void setBackColorIndex(int color)
public void setBorder(boolean border)
border
- - true if the workbook should have a border painted around it, false otherwisepublic void setBoundsWithClip(int x, int y, int width, int height, int x1, int y1, int width1, int height1)
public void setCellFormat(CellFormat cellformat) throws CellException
cellformat
- - an instance of the CellFormat object
CellException
public void setCellFormat(CellFormat cellformat, int row1, int col1, int row2, int col2) throws CellException
cellformat
- - an instance of a CellFormat objectrow1
- - the first row in the rangecol1
- - the first column in the rangerow2
- - the ending row in the rangecol2
- - the ending column in the range
CellException
public void setCellFormat(CellFormat cellformat, int sheet1, int row1, int col1, int sheet2, int row2, int col2) throws CellException
cellformat
- - an instance of a CellFormat objectsheet1
- - the beginning sheetrow1
- - the first row in the rangecol1
- - the first column in the rangesheet2
- - the ending sheetrow2
- - the ending row in the rangecol2
- - the ending column in the range
CellException
public void setClip(java.lang.String text) throws CellException
text
- - identifies a tab-delimited text block
CellException
public void setClipValues(java.lang.String text) throws CellException
text
- - identifies a tab-delimited text block
CellException
public static void setClipboard(java.awt.datatransfer.Clipboard clipboard)
clipboard
- - the clipboard to use for clipboard operations This method sets the clipboard to be used for clipboard operations. To force jxcell to use the system clipboard you can call this method and pass in java.awt.Toolkit.getDefaultToolkit().getSystemClipboard() for the value of clipboard. jxcell does not use the system clipboard because it only works with java.awt.datatransfer.StringSelection objects on some platforms. To force jxcell to use the system clipboard you can call setClipboard(...).public void setCol(int col) throws CellException
col
- - the new column for the active cell.
CellException
public void setColHeaderSelected(boolean colHeaderSelected)
colHeaderSelected
- - true if column headers can be selected, false otherwisepublic void setColHidden(int col1, int col2, boolean colHidden) throws CellException
col1
- - number identifying the beginning columncol2
- - number identifying the ending columncolHidden
- - if true, the specified columns are hidden
CellException
public void setColHidden(int col, boolean colHidden) throws CellException
col
- - number identifying the columncolHidden
- - if true, the specified column is hidden
CellException
public void setColText(int col, java.lang.String colText) throws CellException
col
- - identifies a column by numbercolText
- - the column label text
CellException
public void setColWidth(int col, int width) throws CellException
col
- - identifies a column by numberwidth
- - the width of the column
CellException
public void setColWidth(int col1, int col2, int width, boolean defColWidth) throws CellException
col1
- - number identifying the beginning columncol2
- - number identifying the ending columnwidth
- - the column widthdefColWidth
- - true if specified column width becomes default column width, false otherwise
CellException
public void setColWidthAuto(int row1, int col1, int row2, int col2, boolean setDefaults) throws CellException
row1
- - desccol1
- - descrow2
- - desccol2
- - descsetDefaults
- - true if columns larger or smaller than the default column width are set to the default column width, false otherwise
CellException
public void setColWidthTwips(int col1, int width) throws CellException
col1
- - identifies column whose width you want to changewidth
- - indicates the column width value in twips.
CellException
public void setColWidthTwips(int col1, int col2, int width, boolean defColWidth) throws CellException
col1
- - identifies the beginning column in the block of cells whose width you want to changecol2
- - identifies the ending column in the block of cells whose width you want to changewidth
- - indicates the column width value in twips.defColWidth
- - true if the default width is set to Width, and the specified columns are set to the default width. In addition, any columns that use the default width are updated with the new default. False specifies that the default width is unchanged.
CellException
public void setColWidthUnits(short colWidthUnits) throws CellException
colWidthUnits
- - one of the following column width units:
ColWidthUnitsNormalColWidthUnitsNormal
All column widths are converted to units equal to 1/256th of the character 0's width in the default font. This is the default column width unit.
ColWidthUnitsTwipsColWidthUnitsTwips
All widths in the workbook are converted to twips.
This can allow more consistent sizing between printer output and screen display.
CellException
public void setDefaultColWidth(int width) throws CellException
width
- - the column width
This can allow more consistent sizing between printer output and screen display.
CellException
public void setDefaultFont(java.lang.String fontName, int fontSize)
fontName
- - indicates the default font namefontSize
- - indicates the default font size
When setting the size, you can specify points or twips.
When specifying size in points, use a positive number; use a negative number when specifying twips.
When specifying twips, setDefaultFont uses the absolute value of the number you provide for size.public void setDefaultFontName(java.lang.String fontName)
fontName
- - indicates the default font namepublic void setDefaultFontSize(int fontSize)
fontSize
- - indicates the size of the default font.
When setting the size, you can specify points or twips.
When specifying size in points, use a positive number; use a negative number when specifying twips.
When specifying twips, setDefaultFontSize uses the absolute value of the number you provide for size.public void setDefaultRowHeight(int height) throws CellException
height
- - indicates the row height value in twips. A twip is 1/1440th of an inch.
CellException
public void setDefaultRowHeightAutomatic(boolean automatic) throws CellException
automatic
- - true if default row height is automatic
CellException
public void setDefinedName(java.lang.String name, java.lang.String formula) throws CellException
name
- - A defined name. Enter an existing name if you are returning the formula associated with the name or changing the value associated with the name. Enter a unique name if you are creating a new value.formula
- - Describes the range represented by name. A name can refer to a cell, a group of cells, a value, or a formula. When setting name, do not include a leading equal sign (=)in the formula
CellException
public void setDefinedNameLocal(java.lang.String name, java.lang.String formula) throws CellException
name
- - A defined name, in the user's language. Enter an existing name if you are setting the formula associated with the name or changing the value associated with the name. Enter a unique name if you are creating a new value.formula
- - Describes the range represented by name. A name can refer to a cell, a group of cells, a value, or a formula. When setting name, do not include a leading equal sign (=)in the formula
CellException
- if a parameter is invalidpublic void setTextAsValue(int sheet, int row, int col, java.lang.String entry) throws CellException
sheet
- - a sheet number that identifies a worksheet.row
- - a row number that identifies a cell.col
- - a column number that identifies a cell.entry
- - a cell value.
CellException
public void setTextAsValue(int row, int col, java.lang.String entry) throws CellException
row
- - a row number that identifies a cell.col
- - a column number that identifies a cell.entry
- - a cell value.
CellException
public void setTextAsValue(java.lang.String entry) throws CellException
entry
- - the cell value.
CellException
- if there is no selected cellpublic void setTextAsValue(java.lang.String location, java.lang.String entry) throws CellException
location
- a defined name or a reference that identifies a cell.entry
- a cell value
CellException
- when an exception occurspublic void setExtraColor(java.awt.Color color)
color
- - new extra color in the form 0x00rrggbbpublic void setExtraColorIndex(int color)
public void setFixedCol(int col) throws CellException
col
- - number of first fixed column.
CellException
- if col is not a valid column or if (col+ getFixedCols()) > kNrColspublic void setFixedCols(int cols) throws CellException
cols
- - number of fixed columns Set this to zero to turn off fixed columns.
CellException
- if cols is less than zero or the value of getFixedCol + cols is greater than 256.public void setFixedCols(int nCol1, int nCols) throws CellException
nCol1
- - the number of the first fixed columnnCols
- - number of fixed columns. Set this to zero to turn off fixed columns.
CellException
public void setFixedRow(int row) throws CellException
row
- - number of the starting fixed row.
CellException
- if row is not a valid rowpublic void setFixedRows(int rows) throws CellException
rows
- - number of fixed rows Set this to zero to turn off fixed rows
CellException
- if rows is less than zero or getFixedRow + rows exceeds 256.public void setFixedRows(int nRow1, int nRows) throws CellException
nRow1
- - the number of the first row to fixnRows
- - number of fixed rows Set this to zero to turn off fixed rows.
CellException
- if rows is less than zero or getFixedRow + rows exceeds 256public void setFormatPaintMode(boolean isFormatPaintMode) throws CellException
isFormatPaintMode
- - Boolean that determines the state of the Format Paint Mode.
CellException
public void setFormula(int sheet, int row, int col, java.lang.String formula) throws CellException
sheet
- - The number of a worksheet.row
- - number of a row that identifies a specific cell.col
- - number of a column that identifies a specific cell.formula
- - formula for the active cell. The string should not have a leading equal sign (=).
CellException
- If the string is not a valid workbook formula.public void setFormula(int row, int col, java.lang.String formula) throws CellException
row
- - number of a row that identifies a specific cell.col
- - number of a column that identifies a specific cell.formula
- - formula for the active cell. The string should not have a leading equal sign (=).
CellException
- If the string is not a valid workbook formula.public void setArrayFormula(int row, int col, int row2, int col2, java.lang.String formula) throws CellException
row
- - start row number.col
- - start col number.row2
- - end row number.col2
- - end col number.formula
- - formula for the active cell. The string should have a leading equal sign (=).
CellException
- If the string is not a valid workbook formula.public void setFormula(java.lang.String formula) throws CellException
formula
- - The formula for the active cell. The string should not have a leading equal sign (=).
CellException
- If there is no active cell or formula is not a valid workbook formula.public void setFormulaLocal(int sheet, int row, int col, java.lang.String formula) throws CellException
sheet
- - The number of a worksheet.row
- - number of a row that identifies a specific cell..col
- - number of a column that identifies a specific cell.formula
- - The formula for the active cell. The string should not have a leading equal sign (=).
CellException
- If the string is not a valid workbook formula.public void setFormulaLocal(int row, int col, java.lang.String formula) throws CellException
row
- - number of a row that identifies a specific cell..col
- - number of a column that identifies a specific cell.formula
- - The formula for the active cell. The string should not have a leading equal sign (=).
CellException
- If the string is not a valid workbook formula.public void setFormulaLocal(java.lang.String formula) throws CellException
formula
- - The formula for the active cell. The string should not have a leading equal sign (=).
CellException
- If the string is not a valid workbook formula.public void setGroup(java.lang.String group) throws CellException
group
- - the new group name for the workbook attached to this view. A value of null or "" will put the workbook in it's own group.
CellException
- if the group cannot be set due to lack of resources.public void setHeaderHeight(int height) throws CellException
height
- - The height of the column header in twips. A twip is 1/1440 of an inch.
CellException
- if a parameter is invalidpublic void setHeaderSelection(boolean topLeftHeader, boolean rowHeader, boolean colHeader)
topLeftHeader
- - Boolean that specifies whether the cell at the intersection of the row and column headings is selected.rowHeader
- - Boolean that specifies whether the row headers are selected.colHeader
- - Boolean that specifies whether the column headers are selected.public void setHeaderWidth(int width) throws CellException
width
- - width of the row header.
CellException
public void setIterationEnabled(boolean iterationEnabled)
iterationEnabled
- - Boolean that determines if iteration is enabled.public void setIterationMax(int iterationMax)
iterationMax
- - Maximum number of iterationspublic void setIterationMaxChange(double iterationMaxChange)
iterationMaxChange
- - The maximum change value for iterations.public void setLeftCol(int leftCol) throws CellException
leftCol
- - number of the leftmost column
CellException
public void setLogical(int sheet, int row, int col, boolean logical) throws CellException
sheet
- - number of a worksheet.row
- - number of a row that identifies a specific cell.col
- - number of a column that identifies a specific cell.logical
- - Boolean specifies logical value for the cell.
CellException
public void setLogical(int row, int col, boolean logical) throws CellException
row
- - number of a row that identifies a specific cell.col
- - number of a column that identifies a specific cell.logical
- - Boolean specifies logical value for the cell.
CellException
public void setLogical(boolean logical) throws CellException
logical
- - Boolean specifies logical value for the active cell.
CellException
public void setMaxCol(int maxCol) throws CellException
maxCol
- - the maximum column which may be displayed in the current sheet.
CellException
- if maxCol is not a valid column number or if maxCol is less than getMinCol( )public void setMaxRow(int maxRow) throws CellException
maxRow
- - the maximum row which may be displayed in the current sheet.
CellException
- if maxRow is not a valid row number or if maxRow is less than getMinRowpublic void setMinCol(int minCol) throws CellException
minCol
- - the minimum column which may be displayed in the current sheet.
CellException
- if minCol is not a valid col number or if minCol is greater than getMaxColpublic void setMinRow(int minRow) throws CellException
minRow
- - the minimum column which may be displayed in the current sheet.
CellException
- if minRow is not a valid row number of if minRow is greater than getMaxRowpublic void setMode(short mode) throws CellException
mode
- - mouse action mode: eModeNormal eModeLine eModeRectangle eModeOval eModeArc eModeText eModeButton eModePicture eModePolygon eModeDropDown eModeCheckBox eModeChart
CellException
- if a parameter is invalidpublic int getNumSheets()
public int getSheetsCount()
public void setNumSheets(int sheets) throws CellException
sheets
- - the number of worksheets that make up the workbook
CellException
public void setSheetsCount(int sheets) throws CellException
CellException
public void setNumber(double number) throws CellException
number
- - the cell value
CellException
- if there is no active cell.public void setNumber(int row, int col, double number) throws CellException
row
- - the number of a row that identifies a specific cell.col
- - the number of a column that identifies a specific cell.number
- - the cell value
CellException
- if row or column numbers are not validpublic void setNumber(int sheet, int row, int col, double number) throws CellException
sheet
- - the number of a worksheetrow
- - the number of a row that identifies a specific cell.col
- - the number of a column that identifies a specific cell.number
- - the cell value
CellException
- if sheet, row, or column numbers are not validpublic void setPaletteEntry(int entry, java.awt.Color color) throws CellException
entry
- - Zero-based index of the entry to change. jxcell presents a color palette with 56 colorscolor
- - a java.awt.color object that describes a specific color
CellException
- if entry is invalidpublic void setPolyEditMode(short polyEditMode) throws CellException
polyEditMode
- - indicates one of the following polyEdit modes: ePolyEditModeNormal = 0; ePolyEditModePoints = 1
CellException
- if a parameter is invalidpublic void setPrecisionAsDisplayed(boolean precisionAsDisplayed)
precisionAsDisplayed
- - If true, the value in each cell is rounded to the precision displayed in the cell. If false, the value is stored as entered or calculated.public void setPrintArea() throws CellException
CellException
public void setPrintArea(java.lang.String formula) throws CellException
formula
- - description
CellException
public void setPrintAreaLocal(java.lang.String formula) throws CellException
formula
- - description
CellException
public void setPrintBottomMargin(double printBottomMargin)
printBottomMargin
- - the bottom print margin.public void setPrintColHeading(boolean printColHeading)
printColHeading
- - boolean that determines whether headings are printed.public void setPrintFooter(java.lang.String printFooter)
printFooter
- - String that contains the codes and text that make up the footer.public void setPrintFooterMargin(double printFooterMagrin)
printFooterMagrin
- - size of the marginpublic void setPrintGridLines(boolean printGridLines)
printGridLines
- - true if grid lines should be printed for the current sheet, false otherwise.public void setPrintHCenter(boolean printHCenter)
printHCenter
- - true if the current sheet is to be centered horizontally when printed, false otherwise.public void setPrintHeader(java.lang.String printHeader)
printHeader
- - string that contains text and codes for header.public void setPrintHeaderMargin(double printHeaderMargin)
printHeaderMargin
- - size of the margin.public void setPrintLandscape(boolean printLandscape)
printLandscape
- - boolean, if True job is printed Landscape, if False job is printed portrait.public void setPrintLeftMargin(double printLeftMargin)
printLeftMargin
- - the left print margin.public void setPrintLeftToRight(boolean printLeftToRight)
printLeftToRight
- - true if the current sheet is to be printed left to right then top to bottom, false otherwise.public void setPrintNoColor(boolean printNoColor)
printNoColor
- - True turns off colors and patternspublic void setPrintRightMargin(double printRightMargin)
printRightMargin
- - the right print margin.public void setPrintRowHeading(boolean printRowHeading)
printRowHeading
- - true if row headings should be printed for the current sheet, false otherwise.public void setPrintScale(int scale) throws CellException
scale
- - Indicates the scale factor. Scale factor can range * from 10 to 400.
CellException
- if a parameter is invalidpublic void setPrintScale(int scale, boolean fitToPage, int verticalPages, int horizontalPages) throws CellException
scale
- - descriptionfitToPage
- - if true, worksheet is scaled to fit in the number of pages specified by verticalPages and horizontalPages. If False, scale is used to print worksheet.verticalPages
- - the number of vertical pages to which the print job is fit.horizontalPages
- - the number of horizontal pages to which the print job is fit.
CellException
- if a parameter is invalidpublic void setPrintScaleFitHPages(int fitToPage) throws CellException
fitToPage
- - controls whether pages are fitted.
CellException
public void setPrintScaleFitToPage(boolean horizontalPages)
horizontalPages
- - the number of horizontal pages to which the print job is fit.
CellException
- if a parameter is invalidpublic void setPrintScaleFitVPages(int verticalPages) throws CellException
verticalPages
- - the number of vertical pages to which the print job it fit.
CellException
- if a parameter is invalidpublic void setPrintTitles() throws CellException
CellException
- if a parameter is invalidpublic void setPrintTitles(java.lang.String formula) throws CellException
formula
- that identifies the range or ranges holding the titles.
This formula can contain a single range or multiple ranges (e.g., A1:IV2, A1:A16384 prints the first two rows and the first column on every page).
Print titles are row or column titles that are printed on each page. Row titles are printed at the top of each new page; column titles are printed on the left of each new page. If this value is set to null (" "), no titles are printed.
CellException
- if formula is invalidpublic void setPrintTitlesLocal(java.lang.String formula) throws CellException
formula
- that identifies the range or ranges holding the titles.
This formula can contain a single range or multiple ranges (e.g., A1:IV2, A1:A16384 prints the first two rows and the first column on every page).
Print titles are row or column titles that are printed on each page. Row titles are printed at the top of each new page; column titles are printed on the left of each new page. If this value is set to null (" "), no titles are printed.
CellException
- if formula is invalidpublic void setPrintTopMargin(double printTopMargin)
printTopMargin
- - the top print margin.public void setPrintVCenter(boolean printVCenter)
printVCenter
- - true if the current sheet is to be centered vertically when printed, false otherwise.public void setPrintPaperSize(int width, int height) throws CellException
width
- - width of paper in twips.height
- - height of paper in twips.
CellException
public void setRepainting(boolean repaint)
repaint
- - true if the view should paint, false otherwise.public void setRow(int row) throws CellException
row
- - the new row for the active cell.
CellException
- if there is not an active cell or row is not a valid row numberpublic void setRowHeaderSelected(boolean rowHeaderSelected)
rowHeaderSelected
- - Boolean that determines selection. True = selected, False = not unselected.public void setRowHeight(int row, int height) throws CellException
row
- - the row numberheight
- - the row height in twips. A twip is 1/1440th of an inch.
CellException
public void setRowHeight(int row1, int row2, int height, boolean defRowHeight, boolean automatic) throws CellException
row1
- - the first row in the range.row2
- - the last row in the range.height
- - the height in twipsdefRowHeight
- - Specifies whether the default row height is changed. True specifies that the default height is set to height. In addition, any rows that use the default height are updated with the new default. False specifies that the default height is unchanged.automatic
- - boolean flag that determines if the rows resize automatically with font changes
CellException
public void setRowHeightAuto(int row1, int col1, int row2, int col2, boolean setDefaults) throws CellException
row1
- - the first row in the range.col1
- - first column in the rangerow2
- - last row in the rangecol2
- - last column in the rangesetDefaults
- - Determines when the specified rows are resized. If True, all specified rows are adjusted automatically. If False, only rows in the specified row range that need to be larger than their current size are adjusted.
CellException
public void setRowHeightAutomatic(int row, boolean automatic) throws CellException
row
- - the row numberautomatic
- - boolean that specifies rows are automatically resized with font changes.
CellException
public void setRowHidden(int row1, int row2, boolean rowHidden) throws CellException
row1
- - the first row numberrow2
- - the last row numberrowHidden
- - boolean that specifies whether the row is hidden (True) or displayed False)
CellException
public void setRowHidden(int row, boolean rowHidden) throws CellException
row
- - the row numberrowHidden
- - boolean that specifies whether the row is hidden (True) or displayed False)
CellException
public void setRowText(int row, java.lang.String rowText) throws CellException
row
- - a row numberrowText
- - row name
CellException
public void setRowOutlineLevel(int row1, int row2, int outlineLevel, boolean additive) throws CellException
row1
- the first row in the range.row2
- the last row in the range.outlineLevel
- the outline level to set.additive
- Specifies whether the outline level is an absolute value to set, or should be added to the current outline level. if false, the outline level of the specified rows is set to the value set with the outlineLevel parameter.
Otherwise, the value set with the outlineLevel parameter is added to the current outline level of each row.
Note: The outline level may be set from zero to seven.
java.lang.Exception
- exception
CellException
public int getRowOutlineLevel(int row) throws CellException
row
- an integer indicating the index number of the row.
java.lang.Exception
- exception
CellException
public void setSummaryRowsBeforeDetail(boolean summaryBeforeDetail)
summaryBeforeDetail
- if true, row outline summaries are displayed before row detail information.public boolean isSummaryRowsBeforeDetail()
public void setScrollToLastRC(boolean scrollToLastRC)
scrollToLastRC
- - boolean that sets the scroll flag.public void setSelEndCol(int selEndCol) throws CellException
selEndCol
- - the last column to select.
CellException
- if there are no ranges selected or selEndCol is not a valid column number.public void setSelEndRow(int selEndRow) throws CellException
selEndRow
- - the last row to select.
CellException
- if there are no ranges selected or selEndRow is not a valid row number.public void setSelStartCol(int selStartCol) throws CellException
selStartCol
- - the first column to select.
CellException
- if there are no ranges selected or selStartCol is not a valid column number.public void setSelStartRow(int selStartRow) throws CellException
selStartRow
- - the first row to select.
CellException
- if there are no ranges selected or selStartRow is not a valid row numberpublic void setSelection(int row1, int col1, int row2, int col2) throws CellException
row1
- - number of the first row.col1
- - number of the first columnrow2
- - number of the last row.col2
- - number of the last column.
CellException
- exceptionpublic void setSelection(RangeRef rangeref) throws CellException
rangeref
- - a RangeRef object that describes a range of cells.
CellException
- exceptionpublic void setSelection(java.lang.String string) throws CellException
string
- - Identifies the starting and ending rows and columns of the selection or a defined name that represents the selection.
CellException
- exceptionpublic void setSelectionLocal(java.lang.String string) throws CellException
string
- - Identifies the starting and ending rows and columns of the selection or a defined name that represents the selection.
CellException
- exceptionpublic void setSheet(int sheet) throws CellException
sheet
- - index number of the sheet. Worksheets are indexed from left to right beginning with 0.
CellException
- exceptionpublic void setSheetName(int sheet, java.lang.String sheetName) throws CellException
sheet
- - index number of the sheet. Worksheets are indexed from left to right beginning with 0.sheetName
- - the name of the sheet
CellException
- exceptionpublic void setSheetSelected(int sheet, boolean selected) throws CellException
sheet
- - a sheet numberselected
- - boolean that specifies whether the sheet is selected. True = selected, False = not selected.
CellException
- if a parameter is invalidpublic void setShowColHeading(boolean showColHeadings)
showColHeadings
- - boolean that specifies whether headings are displayed. True = displayed, False = hidden.public void setShowEditBar(boolean showEditBar)
showEditBar
- - boolean that specifies if the edit bar is displayed.True = displayed, False = hidden.public void setShowEditBarCellRef(boolean showEditBarCellRef)
showEditBarCellRef
- - boolean that specifies if the edit bar cell reference field is displayed. True = displayed, False = hidden.public void setShowFormulas(boolean showFormulas)
showFormulas
- - boolean that determines whether formulas are displayed. True = formulas displayed, False = values are displayedpublic void setShowGridLines(boolean showGridLines)
showGridLines
- - boolean that determines whether grid lines are displayed. True = displayed, False = hiddenpublic void setShowHScrollBar(short showHScrollBar) throws CellException
showHScrollBar
- - the mode for the horizontal scroll bar:
ShowOff to never show,
ShowOn to always show
ShowAutomatic to show when appropriate
CellException
- if showHScrollBar is not a valid modepublic void setShowRowHeading(boolean showRowHeading)
showRowHeading
- - true if row headings are to be shown, false otherwise.public void setShowSelections(short showSelections) throws CellException
showSelections
- - the mode for highlighting selections:
ShowOff to never show,
ShowOn to always show,
ShowAutomatic to show when window is active
CellException
- if showSelections is not a valid mode.public void setShowTabs(short showTabs) throws CellException
showTabs
- - the mode for displaying the sheet name tabs
TabsOff hide tabs
TabsBottom tabs on bottom
TabsTop tabs on top
CellException
public void setShowTypeMarkers(boolean showTypeMarkers)
showTypeMarkers
- - boolean that specifies display mode for markers. True = display, False = hidden.public void setShowVScrollBar(short showVScrollBar) throws CellException
showVScrollBar
- - the mode for the vertical scroll bar:
ShowOff to never show
ShowOn to always show
ShowAutomatic to show when appropriate
CellException
public void setShowZeroValues(boolean showZeroValues)
showZeroValues
- - boolean that determines whether zeros are displayed.public RangeRef setTabbedText(int row1, int col1, boolean valuesOnly, java.lang.String text) throws CellException
row1
- - the starting row where the text block is to be placedcol1
- - the starting column where the text block is to be placedvaluesOnly
- - boolean that determines whether the text is placed as unformatted text (True) or as formatted text(False)text
- - the tab-delimited block of text
CellException
- if a parameter is invalidpublic void setText(int sheet, int row, int col, java.lang.String text) throws CellException
sheet
- - number of sheetrow
- - number of rowcol
- - number of columntext
- - the text value for the active cell.
CellException
- if the cell reference is invalid or the text is too long.public void setText(int row, int col, java.lang.String text) throws CellException
row
- - number of rowcol
- - number of columntext
- - the text value for the active cell.
CellException
- if the cell reference is invalid or the text is too long.public void setText(java.lang.String text) throws CellException
text
- - the text value for the active cell.
CellException
- if there is no active cell or text is too long.public void setTopRow(int topRow) throws CellException
topRow
- - the first row to display in this view.
CellException
- if topRow is not a valid row number.public void setWorkbookName(java.lang.String workbookName)
workbookName
- - the worksheet namepublic void showActiveCell() throws CellException
CellException
public void showError(java.lang.String errorMsg)
errorMsg
- - a string containing the text of the messagepublic void showError(java.lang.Throwable throwable)
throwable
- - the throwable exceptionpublic void sort(int row1, int col1, int row2, int col2, boolean sortByRows, int[] keys) throws CellException
row1
- - first row in range to be sorted.col1
- - first column in range to be sorted.row2
- - last row in range to be sortedcol2
- - last column in range to be sorted.sortByRows
- - Specifies how data is sorted. If True, data is sorted by rows; if False, data is sorted by columns.keys
- - Identifies the key or keys to use to sort the data. This argument can be a single integer or an array of integers.
CellException
public void sort3(int row1, int col1, int row2, int col2, boolean sortByRows, int keys, int key2, int key3) throws CellException
row1
- - first row in range to be sorted.col1
- - first column in range to be sorted.row2
- - last row in range to be sortedcol2
- - last column in range to be sorted.sortByRows
- - Specifies how data is sorted. If True, data is sorted by rows; if False, data is sorted by columns.keys
- - Identifies the key or keys to use to sort the data. This argument can be a single integer or an array of integers.key2
- - Identifies the secondary key used to sort the data.key3
- - Identifies the final key used to sort the data.
CellException
public void startEdit(boolean clear, boolean inCellEditFocus, boolean arrowsExitEditMode)
clear
- - If True, the edit bar is cleared as edit mode commences.inCellEditFocus
- - If True, editing focus is given to in-cell editing; if False, editing focus is given to the edit bar.arrowsExitEditMode
- - If True, edit mode is exited if you press an arrow key on the keyboard.public int twipsToCharWidth(int nTwips)
nTwips
- - the value to convert
public CellRef twipsToRC(int x, int y)
x
- - Horizontal coordinate of the point to convert.y
- - Vertical coordinate of the point to convert.
public void write(java.lang.String path, short type) throws java.io.IOException, CellException
path
- - path describing name and location of the file.type
- - Constant that describes how the data in the workbook is saved. FileTabbedText FileExcel
CellException
- if a parameter is invalid
java.io.IOException
- if an IO error occurspublic byte[] writeToBlob() throws java.io.IOException, CellException
CellException
- if a parameter is invalid
java.io.IOException
- if an IO error occurspublic void writeURL(java.lang.String logicalSpec, short fileType) throws java.io.IOException, CellException
logicalSpec
- - the string containing the URL addressfileType
- Constant that describes how the data in the workbook is saved.
java.io.IOException
- if an IO error occurs
CellException
- if a parameter is invalid
java.net.MalformedURLException
- MalformedURLExceptionpublic void writeURL(java.net.URL url, short fileType) throws java.io.IOException, CellException
url
- the URL.fileType
- Constant that describes how the data in the workbook is saved.
java.io.IOException
- if an IO error occurs
CellException
- if a parameter is invalidpublic void write(java.lang.String fileName) throws java.io.IOException, CellException
fileName
- path describing name and location of the file.
java.lang.Exception
- if an error occurs
java.io.IOException
CellException
public void writeCSV(java.lang.String fileName) throws java.io.IOException, CellException
fileName
- path describing name and location of the file.
java.lang.Exception
- if an error occurs
java.io.IOException
CellException
public void write(java.lang.String fileName, java.lang.String password) throws java.io.IOException, CellException
fileName
- path describing name and location of the file.password
- The password to use when opening a password-protected file.
java.lang.Exception
- if an error occurs
java.io.IOException
CellException
public void write(java.io.OutputStream outputstream) throws java.io.IOException, CellException
outputstream
- outputstream that describes where to save the file.
java.lang.Exception
- if an error occurs
java.io.IOException
CellException
public void writeCSV(java.io.OutputStream outputstream) throws java.io.IOException, CellException
outputstream
- outputstream that describes where to save the file.
java.lang.Exception
- if an error occurs
java.io.IOException
CellException
public java.lang.String toCSV() throws java.io.IOException, CellException
java.io.IOException
CellException
public void write(java.io.OutputStream outputstream, java.lang.String password) throws java.io.IOException, CellException
outputstream
- outputstream that describes where to save the file.password
- The password to use when opening a password-protected file.
java.lang.Exception
- if an error occurs
java.io.IOException
CellException
public void addHyperlink(int row1, int col1, int row2, int col2, java.lang.String url, int type, java.lang.String tooltip) throws CellException
row1
- row numbercol1
- col numberrow2
- row numbercol2
- col numberurl
- urltype
- 0 - Intra doc, 1 - Absolute URL, 2 - Relative URL, 3 - Absolute file path, 4 - Relative File path, 5 - Network File path.tooltip
- the tool tip string
CellException
- exceptionpublic HyperLink[] getHyperlinks(int row1, int col1, int row2, int col2)
row1
- start rowcol1
- start colrow2
- end rowcol2
- end col
public HyperLink[] getHyperlinks(int sheet) throws CellException
sheet
- sheet index
CellException
- exceptionpublic HyperLink getHyperlink(int row, int col)
row
- the row coordinate of the hyperlink.col
- the col coordinate of the hyperlink.
public void removeHyperlink(HyperLink hyperlink) throws CellException
hyperlink
- Hyperlink
CellException
- exceptionpublic void setConditionalFormats(ConditionFormat[] condfmts) throws CellException
condfmts
- an array of 0...3 ConditionalFormat objects to apply to the current selection.
if this is null, or has a length of zero, conditional formats are removed.
CellException
- exceptionpublic ConditionFormat[] getConditionalFormats() throws CellException
CellException
public ConditionFormat CreateConditionFormat()
public void setDataValidation(DataValidation dataValidation) throws CellException
dataValidation
- data validation objects to apply to the current selection.
if this is null, or it has the type of zero, validation in current selection will be removed.
java.lang.Exception
- exception
CellException
public DataValidation CreateDataValidation()
public DataValidation getValidation(int row1, int col1)
row1
- row numbercol1
- column number
public void setXMLStaxMode(boolean staxMode)
staxMode
- in this mode it will use stax parser to parse the openxml content,it will improve the parsing speed and save the memory usage.public void setTextSelection(int start, int end) throws CellException
start
- starting positon of selection.end
- ending positon of selection.
java.lang.Exception
- if the positions are invalid, selected cell is not text or more than one cell is selected.
CellException
public void CopySheetFromBook(View m_SrcView, int srcSheetIndex, int destSheetIndex) throws CellException
m_SrcView
- source view contain sheet to be copied.srcSheetIndex
- the index number of the sheet,the sheets indexed from left to right beginning with 0destSheetIndex
- the index number of the sheet,the sheets indexed from left to right beginning with 0
CellException
- if a parameter is invalid or exception occur.public void setTabFont(java.lang.String name, int height, boolean bold, boolean italic)
name
- font nameheight
- font height in twips
To convert twips to points, divide the number of twips by 20bold
- font bolditalic
- font italicpublic void setChartSheet(int sheet) throws CellException
CellException
public void chartSheet(ChartShape chart, java.lang.String sheetName) throws CellException
CellException
public void moveSheet(int i) throws CellException
CellException
public boolean canEditPaste()
public boolean canEditPasteSpecial()
public void selectionChanged(ViewEvent viewevent)
public void viewChanged(ViewEvent viewevent)
public void addComment(int row1, int col1, java.lang.String text, java.lang.String author) throws CellException
row1
- the row coordinate of the comment.col1
- the col coordinate of the comment.text
- comment text contentauthor
- comment author
java.lang.Exception
- exception
CellException
public CommentShape getComment(int row1, int col1) throws CellException
row1
- the row coordinate of the cell.col1
- the col coordinate of the cell.
java.lang.Exception
- exception
CellException
public int getCommentCount()
public CommentShape getComment(int index) throws CellException
index
- Comment index in the sheet
java.lang.Exception
- if not a valid chart index
CellException
public void removeComment(CommentShape comment) throws CellException
comment
- comment shape
java.lang.Exception
- exception
CellException
public PictureShape addPicture(double x1, double y1, double x2, double y2, byte[] picData) throws CellException
x1
- Coordinate of the first anchor point of the object; measured in columns from the left edge of the worksheet.y1
- Coordinate of the first anchor point; measured in rows from the top edge of the worksheet.x2
- Coordinate of the second anchor point; measured in columns from the left edge of the worksheet.y2
- Coordinate of the second anchor point; measured in rows from the top edge of the worksheet.picData
- byte array of the picture
java.lang.Exception
- if a parameter is invalid
CellException
public PictureShape getPictureShape(int index) throws CellException
index
- Picture index in the sheet
java.lang.Exception
- if not a valid Picture index
CellException
public void removePicture(int index) throws CellException
index
- image index
java.lang.Exception
- exception
CellException
public int getPictureCount()
public ChartShape addChart(double x1, double y1, double x2, double y2) throws CellException
x1
- Coordinate of the first anchor point of the object; measured in columns from the left edge of the worksheet.y1
- Coordinate of the first anchor point; measured in rows from the top edge of the worksheet.x2
- Coordinate of the second anchor point; measured in columns from the left edge of the worksheet.y2
- Coordinate of the second anchor point; measured in rows from the top edge of the worksheet.
CellException
- if a parameter is invalid.public ChartShape addChartSheet(int sheetIndex) throws CellException
sheetIndex
- sheet index
CellException
- if a parameter is invalid.public ChartShape getChart(int index) throws CellException
index
- chart index in the sheet
java.lang.Exception
- if not a valid chart index
CellException
public void removeChart(int index) throws CellException
index
- chart index
java.lang.Exception
- exception
CellException
public int getChartCount()
public Book getModelBook()
public Sheet getSelSheet()
public BookAdapter getBookAdapter()
public void addPicture(java.io.InputStream fileinputstream) throws CellException
CellException
public ShapeObj getFirstShapeObj()
public ShapeObj getSelectedShapeObj(int selection) throws CellException
CellException
public void removeShapeObj(ShapeObj grobject) throws CellException
CellException
public int getSelectedShapeObjCount()
public void groupShapes() throws CellException
CellException
public void ungroupShapes() throws CellException
CellException
public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
public void setTextAntialiasing(boolean v)
public boolean isShowContextMenus()
public void setShowContextMenus(boolean value)
public boolean isPrintAutoPageNumbering()
public void setPrintAutoPageNumbering(boolean v)
public int getPrintFirstPageNumber()
public void setPrintFirstPageNumber(int v) throws CellException
CellException
public int getPrintPaperSize()
public void setPrintPaperSize(int v) throws CellException
CellException
public int getValueFormatCount() throws CellException
CellException
public int getValueFormatType(int i) throws CellException
CellException
public boolean isValueFormatHidden(int i) throws CellException
CellException
public java.lang.String getValueFormatStr(int i) throws CellException
CellException
public boolean isLotusEvaluation(int i) throws CellException
CellException
public void setLotusEvaluation(int i, boolean v) throws CellException
CellException
public void autoFilter() throws CellException
java.lang.Exception
- if this range cannot be filtered.
CellException
public void removeFilter() throws CellException
CellException
public ChartShape copyChartTo(ChartShape chartShape, int x1, int y1, int x2, int y2) throws CellException
chartShape
- source chart shapex1
- Coordinate of the first anchor point of the object; measured in columns from the left edge of the worksheet.y1
- Coordinate of the first anchor point; measured in rows from the top edge of the worksheet.x2
- Coordinate of the second anchor point; measured in columns from the left edge of the worksheet.y2
- Coordinate of the second anchor point; measured in rows from the top edge of the worksheet.
CellException
- invalid parameterpublic void clearCell(int row, int col)
row
- - cell row indexcol
- - cell column indexpublic int getSheetTabColor()
public void setSheetTabColor(java.awt.Color color)
public void setDropDownBKColor(int color)
public void setDropDownFontName(java.lang.String name)
public void setDropDownFontSize(int size)
public void setDropDownItemsSorted(boolean size)
public void setSelLine(int lineWidth, int lineColor, int fillColor)
public int showConfirmDialog(java.lang.String message, java.lang.String title, int optiontype, int messagetype)
public static java.lang.String getVersionString()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |