worksheet-ag凯发旗舰厅



com.spire.xls
class worksheet

java.lang.object
  extended by com.spire.xls.core.spreadsheet.xlsobject
      extended by com.spire.xls.core.spreadsheet.xlsworksheetbase
          extended by com.spire.xls.core.spreadsheet.xlsworksheet
              extended by com.spire.xls.worksheet
all implemented interfaces:
iworksheet

public class worksheet
extends xlsworksheet

represents the worksheet.


nested class summary
 
nested classes/interfaces inherited from class com.spire.xls.core.spreadsheet.xlsworksheet
xlsworksheet.trangevaluetype
 
method summary
 void applystyle(cellstyle style)
          apply style to whole sheet.
 void copy(cellrange sourcerange, cellrange destrange)
          copys data from a source range to a destination range.
 void copy(cellrange sourcerange, cellrange destrange, boolean copystyle)
          copys data from a source range to a destination range.
 void copy(cellrange sourcerange, cellrange destrange, boolean copystyle, boolean updatereference, boolean ignoresize)
          copys data from a source range to a destination range.
 void copy(cellrange sourcerange, cellrange destrange, boolean copystyle, boolean updatereference, boolean ignoresize, boolean copyshape)
           
 void copy(cellrange sourcerange, cellrange destrange, java.util.enumset<copyrangeoptions> copyoptions)
          copys data from a source range to a destination range.
 void copy(cellrange sourcerange, worksheet worksheet, int destrow, int destcolumn)
          copy data from source range to destination worksheet.
 void copy(cellrange sourcerange, worksheet worksheet, int destrow, int destcolumn, boolean copystyle)
          copy data from source range to destination worksheet.
 void copy(cellrange sourcerange, worksheet worksheet, int destrow, int destcolumn, boolean copystyle, boolean updatererence)
          copy data from source range to destination worksheet.
 void copyfrom(worksheet worksheet)
          copy data from specified worksheet.
 datatable exportdatatable(cellrange range, boolean exportcolumnnames)
          exports worksheet data into a datatable.
 datatable exportdatatable(cellrange range, boolean exportcolumnnames, boolean computedformulavalue)
          exports worksheet data into a datatable.
 datatable exportdatatable(int firstrow, int firstcolumn, int maxrows, int maxcolumns, boolean exportcolumnnames)
          exports worksheet data into a datatable
 cellrange[] findall(java.lang.string findvalue, java.util.enumset<findtype> flags, java.util.enumset<excelfindoptions> findoptions)
          finds the all cells with specified string value.
 cellrange[] findallbool(boolean boolvalue)
          finds the cell with the input bool.
 cellrange[] findalldatetime(java.util.date datevalue)
          finds the cell with the input date time.
 cellrange[] findallnumber(double doublevalue, boolean formulavalue)
          finds the cell with the input number.
 cellrange[] findallstring(java.lang.string stringvalue, boolean formula, boolean formulavalue)
          finds the cell with the input string.
 cellrange findbool(boolean boolvalue)
          finds the cell with the input bool.
 cellrange finddatetime(java.util.date datevalue)
          finds the cell with the input date.
 cellrange findstring(java.lang.string stringvalue, boolean formula, boolean formulavalue)
          finds the cell with the input string.
 void freezepanes(int rowindex, int columnindex)
          freezes panes at the specified cell in the worksheet.
 cellrange getallocatedrange()
          returns a range object that represents the used range on the specified worksheet.
 autofilterscollection getautofilters()
          returns auto filters collection of worksheet.
 workbook getbook()
           
 cellrange getcellrange(int row, int column)
          gets cell range.
 cellrange getcellrange(int row, int column, int lastrow, int lastcolumn)
          gets cell range.
 cellrange getcellrange(java.lang.string name)
          gets cell range.
 cellrange[] getcells()
          returns all used cells in the worksheet.
 worksheetchartscollection getcharts()
          returns charts collection.
 cellrange[] getcolumns()
          rrepresents all used columns on the specified worksheet.
 commentscollection getcomments()
          returns comments collection for this worksheet.
 cellstyle getdefaultcolumnstyle(int columnindex)
          returns default column style.
 cellstyle getdefaultrowstyle(int rowindex)
          returns default row style.
 hpagebreakscollection gethpagebreaks()
          returns an hpagebreaks collection that represents the horizontal
 hyperlinkscollection gethyperlinks()
          collection of all worksheet's hyperlinks.
 cellrange getintersectranges(cellrange range1, cellrange range2)
          intersects two ranges.
 cellrange[] getmergedcells()
          returns all merged ranges.
 pagesetup getpagesetup()
          returns a page setup object that contains all the page setup settings for the specified object.
 workbook getparentbook()
           
 picturescollection getpictures()
          pictures collection.
 cellrange getprintrange()
          print area of worksheet.
 cellrange getrange()
          returns a range object that represents the used range on the specified worksheet.
 cellrange[] getrows()
          represents all the rows on the specified worksheet.
 vpagebreakscollection getvpagebreaks()
          returns a vpagebreaks collection that represents the vertical page breaks on the sheet.
 cellrange merge(cellrange range1, cellrange range2)
          combines a range of cells into a single cell.
 void move(cellrange sourcerange, cellrange destrange)
          move data from source range to destination range.
 void move(cellrange sourcerange, cellrange destrange, boolean updatereference, boolean copystyle)
           
 void removemergedcells(cellrange range)
          remove merged cells from specified range.
 void removepicture(int index)
          remove picture from this worksheet.
 void removepicture(ipictureshape picture)
          remove picture from this worksheet.
 void removepicture(java.lang.string picturename)
          remove picture from this worksheet.
 void removerange(cellrange range)
          removes range from list.
 void removerange(int rowindex, int columnindex)
          removes range from list.
 void setactivecell(cellrange range)
          sets active cell
 void setdefaultcolumnstyle(int columnindex, cellstyle defaultstyle)
          sets default style for column.
 void setdefaultcolumnstyle(int firstcolumnindex, int lastcolumnindex, cellstyle defaultstyle)
          sets default style for column.
 void setdefaultrowstyle(int rowindex, cellstyle defaultstyle)
          sets default style for row.
 void setdefaultrowstyle(int firstrowindex, int lastrowindex, cellstyle defaultstyle)
          sets default style for row.
 
methods inherited from class com.spire.xls.core.spreadsheet.xlsworksheet
addalloweditrange, addalloweditrange, autofitcolumn, autofitcolumn, autofitrow, autofitrow, checkexistence, clear, cleardata, columnwidthtopixels, createnamedranges, deletecolumn, deletecolumn, deleterange, deleterow, deleterow, exportdata, exportdata, exportdata, exportdatatable, get, get, get, getactivepane, getboolean, getcaculatevalue, getcelllist, getcelltype, getclonedobject, getcolumnwidth, getcolumnwidthpixels, getconditionalformats, getdefaultcolumnwidth, getdefaultprintrowheight, getdefaultrowheight, getdisplaypagebreaks, getdvtable, geterror, getfirstvisiblecolumn, getfirstvisiblerow, getformula, getformula, getformulaboolvalue, getformulaerrorvalue, getformulanumbervalue, getformulastringvalue, getgridlinesvisible, gethorizontalsplit, getlistobjects, getnames, getnumber, getoleobjects, getpivottables, getprotectcontents, getquotedname, getrowcolumnheadersvisible, getrowheight, getrowheightpixels, getselectioncount, getsparklinegroups, getstandardheightflag, getstringvalue, gettext, gettextobject, gettopleftcell, gettype, getuserangescache, getversion, getverticalsplit, getviewmode, getzoom, getzoomscalenormal, getzoomscalepagebreakview, getzoomscalepagelayoutview, groupbycolumns, groupbyrows, hasarrayformula, hasarrayformularecord, hasmergedcells, hasoleobjects, hidecolumn, hiderow, importdatatable, importdatatable, insertarray, insertarray, insertarray, insertarray, insertarray, insertarray, insertarraylist, insertarrayt, insertcolumn, insertcolumn, insertcolumn, insertdatacolumn, insertdatacolumns, insertdatatable, insertdatatable, insertdatatable, insertdatatable, insertdatatable, insertdataview, insertdataview, insertdataview, insertdataview, insertrange, insertrow, insertrow, insertrow, isarrayformula, iscolumnvisible, isdisplayzeros, isdisplayzeros, isempty, isexternalformula, isfreezepanes, isrowvisible, isstringspreserved, isstringspreserved, moveworksheet, pixelstocolumnwidth, remove, removemergedcells, removepanes, replace, replace, replace, replace, replace, replace, replace, replace, savetoemfimage, savetofile, savetofile, savetofile, savetohtml, savetohtml, savetohtml, savetoimage, savetoimage, savetopdf, savetopdfstream, savetostream, savetostream, savetostream, savetotiff, savetotiff, setactivecell, setactivepane, setblank, setboolean, setcaculatevalue, setcellvalue, setcellvalue, setcolumnwidth, setcolumnwidthinpixels, setcolumnwidthinpixels, setdefaultcolumnstyle, setdefaultcolumnstyle, setdefaultcolumnwidth, setdefaultprintrowheight, setdefaultrowheight, setdefaultrowstyle, setdefaultrowstyle, setdisplaypagebreaks, seterror, setfirstcolumn, setfirstrow, setfirstvisiblecolumn, setfirstvisiblerow, setformula, setformula, setformulaboolvalue, setformulaerrorvalue, setformulanumbervalue, setformulastringvalue, setgridlinesvisible, sethorizontalsplit, setlastcolumn, setlastrow, setnumber, setrowcolumnheadersvisible, setrowheight, setrowheightinpixels, setrowheightpixels, setstandardheightflag, settext, settopleftcell, setuserangescache, setverticalsplit, setviewmode, setzoom, setzoomscalenormal, setzoomscalepagebreakview, setzoomscalepagelayoutview, showcolumn, showrow, toimage, tosvgstream, ungroupbycolumns, ungroupbyrows
 
methods inherited from class com.spire.xls.core.spreadsheet.xlsworksheetbase
activate, getarcshapes, getbuttonshapes, getcheckboxes, getcodename, getcomboboxes, getdefaultgridlinecolor, getfirstcolumn, getfirstrow, getgridlinecolor, getgroupboxes, getheaderfootershapes, getindex, getlabelshapes, getlastcolumn, getlastrow, getleftvisiblecolumn, getlines, getlistboxes, getname, getovalshapes, getparentworkbook, getprotectdrawingobjects, getprotection, getprotectscenarios, getprstgeomshapes, getradiobuttons, getrealindex, getrectangleshapes, getscrollbarshapes, getshapes, getsheetid, getspinnershapes, gettabcolor, gettabcolorobject, gettabknowncolor, gettextboxes, gettopvisiblerow, gettypedarcs, gettypedbuttons, gettypedcheckboxes, gettypedcomboboxes, gettypedgroupboxes, gettypedlabels, gettypedlines, gettypedlistboxes, gettypedovals, gettypedpictures, gettypedradiobuttons, gettypedrects, gettypedscollbars, gettypedspinners, gettypedtextboxes, getunknownvmlshapes, getvisibility, getvmlshapescount, getworkbook, haspictures, hasvmlshapes, ispasswordprotected, isrighttoleft, isrighttoleft, isselected, protect, protect, select, selecttab, setchanged, setgridlinecolor, setindex, setleftvisiblecolumn, setname, setrealindex, settabcolor, settabknowncolor, settopvisiblerow, setunknownvmlshapes, setvisibility, unprotect, unprotect, unselect, unselect
 
methods inherited from class com.spire.xls.core.spreadsheet.xlsobject
dispose
 
methods inherited from interface com.spire.xls.core.iworksheet
copytoclipboard, getcodename, getgridlinecolor, getindex, getleftvisiblecolumn, gettopvisiblerow, protect, savetoimage, savetoimage, savetoimage, savetostream, seterror, setgridlinecolor, setleftvisiblecolumn, settopvisiblerow, setvalue, unprotect
 
method detail

getallocatedrange

public cellrange getallocatedrange()
returns a range object that represents the used range on the specified worksheet. read-only.
specified by:
getallocatedrange in interface iworksheet
overrides:
getallocatedrange in class xlsworksheet
returns:
cell range

getcellrange

public cellrange getcellrange(int row,
                              int column,
                              int lastrow,
                              int lastcolumn)
gets cell range.
parameters:
row -
column -
lastrow -
lastcolumn -
returns:

getcellrange

public cellrange getcellrange(int row,
                              int column)
gets cell range.
parameters:
row -
column -
returns:

getcellrange

public cellrange getcellrange(java.lang.string name)
gets cell range.
parameters:
name - cell name
returns:

getmergedcells

public cellrange[] getmergedcells()
returns all merged ranges. read-only.
specified by:
getmergedcells in interface iworksheet
overrides:
getmergedcells in class xlsworksheet
returns:

findall

public cellrange[] findall(java.lang.string findvalue,
                           java.util.enumset<findtype> flags,
                           java.util.enumset<excelfindoptions> findoptions)
finds the all cells with specified string value.
parameters:
findvalue - value to search.
flags - type of value to search.
findoptions - way to search.
returns:
all found cells, or null if value was not found.

findallnumber

public cellrange[] findallnumber(double doublevalue,
                                 boolean formulavalue)
finds the cell with the input number.
parameters:
doublevalue - double value to search for.
formulavalue - indicates if includes formula value.
returns:
found ranges.

findallstring

public cellrange[] findallstring(java.lang.string stringvalue,
                                 boolean formula,
                                 boolean formulavalue)
finds the cell with the input string.
parameters:
stringvalue - string value to search for.
formula - indicates if includes formula.
formulavalue - indicates if includes formula value.
returns:
found ranges.

findalldatetime

public cellrange[] findalldatetime(java.util.date datevalue)
finds the cell with the input date time.
parameters:
datevalue - date value to search for.
returns:
found ranges.

findallbool

public cellrange[] findallbool(boolean boolvalue)
finds the cell with the input bool.
parameters:
boolvalue - bool value to search for.
returns:
found ranges.

findbool

public cellrange findbool(boolean boolvalue)
finds the cell with the input bool.
parameters:
boolvalue - bool value to search for.
returns:
found range.

findstring

public cellrange findstring(java.lang.string stringvalue,
                            boolean formula,
                            boolean formulavalue)
finds the cell with the input string.
parameters:
stringvalue - string value to search for.
formula - indicates whether includes formula.
formulavalue - indicates whether includes formula value.
returns:

finddatetime

public cellrange finddatetime(java.util.date datevalue)
finds the cell with the input date.
parameters:
datevalue - date value to search for.
returns:
found range.

copyfrom

public void copyfrom(worksheet worksheet)
copy data from specified worksheet.
parameters:
worksheet - worksheet object

copy

public void copy(cellrange sourcerange,
                 cellrange destrange)
copys data from a source range to a destination range.
parameters:
sourcerange - source range.
destrange - destination range.

copy

public void copy(cellrange sourcerange,
                 cellrange destrange,
                 boolean copystyle)
copys data from a source range to a destination range.
parameters:
sourcerange - source range.
destrange - destination range.
copystyle - indicates whether copys styles.

copy

public void copy(cellrange sourcerange,
                 cellrange destrange,
                 boolean copystyle,
                 boolean updatereference,
                 boolean ignoresize)
copys data from a source range to a destination range.
parameters:
sourcerange - source range.
destrange - destination range
copystyle - indicates whether copy styles.
updatereference - indicates whether update reference ranges.
ignoresize - indicates whether check range sizes.

copy

public void copy(cellrange sourcerange,
                 worksheet worksheet,
                 int destrow,
                 int destcolumn)
copy data from source range to destination worksheet.
parameters:
sourcerange - source range.
worksheet - destination worksheet
destrow - row index of destination worksheet.
destcolumn - column index of destination worksheet.

copy

public void copy(cellrange sourcerange,
                 worksheet worksheet,
                 int destrow,
                 int destcolumn,
                 boolean copystyle)
copy data from source range to destination worksheet.
parameters:
sourcerange - source range
worksheet - destination worksheet.
destrow - row index of destination worksheet.
destcolumn - column index of destination worksheet.
copystyle - indicates whehter copy styles.

copy

public void copy(cellrange sourcerange,
                 worksheet worksheet,
                 int destrow,
                 int destcolumn,
                 boolean copystyle,
                 boolean updatererence)
copy data from source range to destination worksheet.
parameters:
sourcerange - source range
worksheet - destination worksheet.
destrow - row index of destination worksheet.
destcolumn - column index of destination worksheet.
copystyle - indicates whehter copy styles.
updatererence - indicates whether update reference range.

copy

public void copy(cellrange sourcerange,
                 cellrange destrange,
                 boolean copystyle,
                 boolean updatereference,
                 boolean ignoresize,
                 boolean copyshape)
parameters:
sourcerange - source range.
destrange - destination range
copystyle - indicates whether copy styles.
updatereference - indicates whether update reference ranges.
ignoresize - indicates whether check range sizes.
copyshape - indicates whether copy shape.

copy

public void copy(cellrange sourcerange,
                 cellrange destrange,
                 java.util.enumset<copyrangeoptions> copyoptions)
copys data from a source range to a destination range.
parameters:
sourcerange - source range.
destrange - destination range.
copyoptions - copy options.

move

public void move(cellrange sourcerange,
                 cellrange destrange)
move data from source range to destination range.
parameters:
sourcerange - source range.
destrange - destination range.

move

public void move(cellrange sourcerange,
                 cellrange destrange,
                 boolean updatereference,
                 boolean copystyle)

exportdatatable

public datatable exportdatatable(cellrange range,
                                 boolean exportcolumnnames)
exports worksheet data into a datatable.
parameters:
range - range to export.
exportcolumnnames - indicates if export column name.
returns:
exported datatable

exportdatatable

public datatable exportdatatable(cellrange range,
                                 boolean exportcolumnnames,
                                 boolean computedformulavalue)
exports worksheet data into a datatable.
parameters:
range - range to export.
exportcolumnnames - indicates if export column name.
computedformulavalue - indicates wheter compute formula value.
returns:
exported datatable

exportdatatable

public datatable exportdatatable(int firstrow,
                                 int firstcolumn,
                                 int maxrows,
                                 int maxcolumns,
                                 boolean exportcolumnnames)
exports worksheet data into a datatable
parameters:
firstrow - row of first cell.
firstcolumn - column of first cell.
maxrows - maximun rows to export.
maxcolumns - maximun columns to export.
exportcolumnnames - indicates if export column name.
returns:
exported datatable.

getintersectranges

public cellrange getintersectranges(cellrange range1,
                                    cellrange range2)
intersects two ranges.
parameters:
range1 - first range.
range2 - second range.
returns:
intersection of two ranges

merge

public cellrange merge(cellrange range1,
                       cellrange range2)
combines a range of cells into a single cell.
parameters:
range1 - first range.
range2 - second range.
returns:
merged ranges

setdefaultcolumnstyle

public void setdefaultcolumnstyle(int columnindex,
                                  cellstyle defaultstyle)
sets default style for column.
parameters:
columnindex - column index.
defaultstyle - default style.

setdefaultcolumnstyle

public void setdefaultcolumnstyle(int firstcolumnindex,
                                  int lastcolumnindex,
                                  cellstyle defaultstyle)
sets default style for column.
parameters:
firstcolumnindex - first column index.
lastcolumnindex - last column index.
defaultstyle - default style.

setdefaultrowstyle

public void setdefaultrowstyle(int rowindex,
                               cellstyle defaultstyle)
sets default style for row.
parameters:
rowindex - row index.
defaultstyle - default style.

setdefaultrowstyle

public void setdefaultrowstyle(int firstrowindex,
                               int lastrowindex,
                               cellstyle defaultstyle)
sets default style for row.
parameters:
firstrowindex - first row index.
lastrowindex - last row index.
defaultstyle - default style.

getdefaultcolumnstyle

public cellstyle getdefaultcolumnstyle(int columnindex)
returns default column style.
specified by:
getdefaultcolumnstyle in interface iworksheet
overrides:
getdefaultcolumnstyle in class xlsworksheet
parameters:
columnindex - column index.
returns:
default column style or null if default style is not exists.

getdefaultrowstyle

public cellstyle getdefaultrowstyle(int rowindex)
returns default row style.
specified by:
getdefaultrowstyle in interface iworksheet
overrides:
getdefaultrowstyle in class xlsworksheet
parameters:
rowindex - row index.
returns:

removemergedcells

public void removemergedcells(cellrange range)
remove merged cells from specified range.
parameters:
range - specified range.

removerange

public void removerange(cellrange range)
removes range from list.
parameters:
range - specified range.

removerange

public void removerange(int rowindex,
                        int columnindex)
removes range from list.
parameters:
rowindex - row index.
columnindex - column index.

removepicture

public void removepicture(int index)
remove picture from this worksheet.
parameters:
index - picture id

removepicture

public void removepicture(java.lang.string picturename)
remove picture from this worksheet.
parameters:
picturename - picture name

removepicture

public void removepicture(ipictureshape picture)
remove picture from this worksheet.
parameters:
picture - a pictureshape

applystyle

public void applystyle(cellstyle style)
apply style to whole sheet.
overrides:
applystyle in class xlsworksheet
parameters:
style - style to apply

freezepanes

public void freezepanes(int rowindex,
                        int columnindex)
freezes panes at the specified cell in the worksheet.
parameters:
rowindex - row index.
columnindex - column index.

setactivecell

public void setactivecell(cellrange range)
sets active cell
parameters:
range - cell to activate.

getcells

public cellrange[] getcells()
returns all used cells in the worksheet. read-only.
specified by:
getcells in interface iworksheet
overrides:
getcells in class xlsworksheet
returns:

getcolumns

public cellrange[] getcolumns()
rrepresents all used columns on the specified worksheet. read-only range object.
specified by:
getcolumns in interface iworksheet
overrides:
getcolumns in class xlsworksheet
returns:

getpagesetup

public pagesetup getpagesetup()
returns a page setup object that contains all the page setup settings for the specified object. read-only.
specified by:
getpagesetup in interface iworksheet
overrides:
getpagesetup in class xlsworksheet
returns:

getautofilters

public autofilterscollection getautofilters()
returns auto filters collection of worksheet. read-only.
specified by:
getautofilters in interface iworksheet
overrides:
getautofilters in class xlsworksheet
returns:

getcharts

public worksheetchartscollection getcharts()
returns charts collection. read-only.
overrides:
getcharts in class xlsworksheetbase
returns:

getcomments

public commentscollection getcomments()
returns comments collection for this worksheet. read-only.
specified by:
getcomments in interface iworksheet
overrides:
getcomments in class xlsworksheetbase
returns:

gethpagebreaks

public hpagebreakscollection gethpagebreaks()
returns an hpagebreaks collection that represents the horizontal
specified by:
gethpagebreaks in interface iworksheet
overrides:
gethpagebreaks in class xlsworksheet
returns:

gethyperlinks

public hyperlinkscollection gethyperlinks()
collection of all worksheet's hyperlinks.
specified by:
gethyperlinks in interface iworksheet
overrides:
gethyperlinks in class xlsworksheet
returns:

getpictures

public picturescollection getpictures()
pictures collection. read-only.
overrides:
getpictures in class xlsworksheetbase
returns:

getprintrange

public cellrange getprintrange()
print area of worksheet.
returns:

getvpagebreaks

public vpagebreakscollection getvpagebreaks()
returns a vpagebreaks collection that represents the vertical page breaks on the sheet. read-only.
specified by:
getvpagebreaks in interface iworksheet
overrides:
getvpagebreaks in class xlsworksheet
returns:

getrange

public cellrange getrange()
returns a range object that represents the used range on the specified worksheet. read-only.
specified by:
getrange in interface iworksheet
overrides:
getrange in class xlsworksheet
returns:

getrows

public cellrange[] getrows()
represents all the rows on the specified worksheet. read-only range object.
specified by:
getrows in interface iworksheet
overrides:
getrows in class xlsworksheet
returns:

getbook

public workbook getbook()

getparentbook

public workbook getparentbook()


网站地图