xlsworksheet-ag凯发旗舰厅



com.spire.xls.core.spreadsheet
class xlsworksheet

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
all implemented interfaces:
iworksheet
direct known subclasses:
worksheet

public class xlsworksheet
extends xlsworksheetbase
implements iworksheet

represents a worksheet. the worksheet object is a member of the worksheets collection. the worksheets collection contains all the worksheet objects in a workbook.


nested class summary
static class xlsworksheet.trangevaluetype
          represents range value type.
 
constructor summary
xlsworksheet(java.lang.object parent)
           
 
method summary
 boolean addalloweditrange(java.lang.string title, cellrange range)
          add a range of cells that allow editing
 boolean addalloweditrange(java.lang.string title, cellrange range, java.lang.string password)
          adds a range of cells that allow editing
 void autofitcolumn(int columnindex)
          automatically fit the column width.
 void autofitcolumn(int columnindex, int firstrow, int lastrow)
          automatically fit column.
 void autofitrow(int rowindex)
          automatically fit column width.
 void autofitrow(int rowindex, int firstcolumn, int lastcolumn, boolean braiseevents)
          automatically fit row.
 boolean checkexistence(int row, int column)
          indicates whether cell has been initialized.
 void clear()
          clears data the worksheet.
 void cleardata()
          clears contents of a range.
 int columnwidthtopixels(double widthinchars)
          converts column width into pixels.
 void createnamedranges(java.lang.string namedrange, java.lang.string referrange, boolean vertical)
          create named ranges
 void deletecolumn(int columnindex)
          deletes a column.
 void deletecolumn(int index, int count)
          removes specified column.
 void deleterange(cellrange range, deleteoption deleteoption)
          delete a range in worksheet
 void deleterow(int index)
          delete a row.
 void deleterow(int index, int count)
          removes specified row.
 java.lang.object[][] exportdata()
          export sheet data to arrays data.
 java.lang.object[][] exportdata(boolean computeformula)
          export sheet data to arrays data.
 java.lang.object[][] exportdata(int firstrow, int firstcolumn, int maxrows, int maxcolumns, boolean computedformulavalue)
          export sheet data.
 datatable exportdatatable()
          exports worksheet data into a datatable
 ixlsrange get(int row, int column)
          get cell by row and index.
 ixlsrange get(int row, int column, int lastrow, int lastcolumn)
          get cell range.
 ixlsrange get(java.lang.string name)
          get cell range.
 int getactivepane()
          gets or sets index of the active pane.
 ixlsrange getallocatedrange()
          read-only.
  getautofilters()
          returns collection of worksheet's autofilters.
 boolean getboolean(int row, int column)
          gets bool value from cell.
 java.lang.object getcaculatevalue(int row, int col)
          returns the formula string if the cell contains a formula, or the value if the cell cantains anything other than a formula.
 java.util.arraylist<cellrange> getcelllist()
          returns all used cells in the worksheet.
 xlsworksheet.trangevaluetype getcelltype(int row, int column, boolean bneedformulasubtype)
          gets cell type from current column.
  getclonedobject(java.util.hashmap hashnewnames, xlsworkbook book)
          gets object that is clone of current worksheet in the specified workbook.
 ixlsrange[] getcolumns()
          for a worksheet object, returns an array of range objects that represents all used columns on the specified worksheet.
 double getcolumnwidth(int columnindex)
          gets the width of the specified column
 int getcolumnwidthpixels(int columnindex)
          gets the width of the specified column, in units of pixel.
 iconditionalformatscollection getconditionalformats()
          returns collection with all conditional formats in the worksheet.
 istyle getdefaultcolumnstyle(int columnindex)
          returns default column style.
 double getdefaultcolumnwidth()
          returns or sets the default width of all the columns in the worksheet.
 int getdefaultprintrowheight()
          return default row height in pixel.
 double getdefaultrowheight()
          gets or sets default height of all the rows in the worksheet, in points.
 istyle getdefaultrowstyle(int rowindex)
          returns default row style.
 boolean getdisplaypagebreaks()
          true if page breaks (both automatic and manual) on the specified worksheet are displayed.
 idatavalidationtable getdvtable()
           
 java.lang.string geterror(int row, int column)
          gets error value from cell.
 int getfirstvisiblecolumn()
          index to first visible column in right pane(s).
 int getfirstvisiblerow()
          index to first visible row in bottom pane(s).
 java.lang.string getformula(int row, int column, boolean br1c1)
          returns formula corresponding to the cell.
 java.lang.string getformula(int row, int column, boolean br1c1, boolean isforserialization)
          returns formula corresponding to the cell.
 boolean getformulaboolvalue(int row, int column)
          gets formula bool value from cell.
 java.lang.string getformulaerrorvalue(int row, int column)
          gets formula error value from cell.
 double getformulanumbervalue(int row, int column)
          returns formula number value corresponding to the cell.
 java.lang.string getformulastringvalue(int row, int column)
          returns formula string value corresponding to the cell.
 boolean getgridlinesvisible()
          true if gridlines are visible; false otherwise.
 int gethorizontalsplit()
          position of the horizontal split (py, 0 = no horizontal split): unfrozen pane: height of the top pane(s) (in twips = 1/20 of a point) frozen pane: number of visible rows in top pane(s)
 ihpagebreaks gethpagebreaks()
          returns an hpagebreaks collection that represents the horizontal page breaks on the sheet.
 ihyperlinks gethyperlinks()
          collection of all worksheet's hyperlinks.
 ilistobjects getlistobjects()
          returns all list objects in the worksheet.
 ixlsrange[] getmergedcells()
          returns all merged ranges.
 inameranges getnames()
          name range used by macros to access to workbook items.
 double getnumber(int row, int column)
          returns number value corresponding to the cell.
 ioleobjects getoleobjects()
          gets the ole objects.
  getpagesetup()
          returns a pagesetup object that contains all the page setup settings for the specified object.
 pivottablescollection getpivottables()
          returns pivot table collection.
 boolean getprotectcontents()
          indicates whether current sheet is protected.
 java.lang.string getquotedname()
          returns quoted name of the worksheet.
 xlsrange getrange()
          returns a range object that represents the used range on the specified worksheet.
 boolean getrowcolumnheadersvisible()
          true if row and column headers are visible.
 double getrowheight(int row)
          gets the height of a specified row.
 int getrowheightpixels(int rowindex)
          gets the height of a specified row in unit of pixel.
 ixlsrange[] getrows()
          represents all the rows on the specified worksheet.
 int getselectioncount()
          gets array with selection count.
 sparklinegroupcollection getsparklinegroups()
          gets the sparkline groups.
 boolean getstandardheightflag()
          gets or sets the standard (default) height option flag, which defines that standard (default) row height and book default font height do not match.
 java.lang.string getstringvalue(long cellindex)
          returns string value corresponding to the cell.
 java.lang.string gettext(int row, int column)
          returns string value corresponding to the cell.
 java.lang.object gettextobject(long cellindex)
          returns textwithformat object corresponding to the specified cell.
 cellrange gettopleftcell()
          gets top left cell of the worksheet.
 excelsheettype gettype()
          returns or sets the worksheet type.
 boolean getuserangescache()
          indicates whether all created range objects should be cached.
 excelversion getversion()
          gets or sets excel file version.
 int getverticalsplit()
          position of the vertical split (px, 0 = no vertical split): unfrozen pane: width of the left pane(s) (in twips = 1/20 of a point) frozen pane: number of visible columns in left pane(s)
 viewmode getviewmode()
          gets or sets the view mode of the sheet.
 ivpagebreaks getvpagebreaks()
          returns a vpagebreaks collection that represents the vertical page breaks on the sheet.
 int getzoom()
          zoom factor of document.
 int getzoomscalenormal()
          gets or sets the zoom scale of normal view of the sheet.
 int getzoomscalepagebreakview()
          gets or sets the zoom scale of page break preview of the sheet.
 int getzoomscalepagelayoutview()
          gets or sets the zoom scale of page layout view of the sheet.
 cellrange groupbycolumns(int firstcolumn, int lastcolumn, boolean iscollapsed)
          groups columns.
 cellrange groupbyrows(int firstrow, int lastrow, boolean iscollapsed)
          groups rows.
 boolean hasarrayformula(long cellindex)
          indicates whether cell contains array-entered formula.
 boolean hasarrayformularecord(int row, int column)
          indicates is has array formula.
 boolean hasmergedcells()
          indicates whether worksheet has merged cells.
 boolean hasoleobjects()
          indicats whether there is ole object.
 void hidecolumn(int columnindex)
          hides a column.
 void hiderow(int rowindex)
          hides a row.
 int importdatatable(java.lang.object[][] data, boolean includeheaders, int firstrow, int firstcolumn)
          imports data from a datatable into worksheet
 int importdatatable(java.lang.object[][] data, boolean includeheaders, int firstrow, int firstcolumn, int maxrows, int maxcolumns)
          imports data from a datatable into worksheet
 int insertarray(java.util.date[] datearray, int firstrow, int firstcolumn, boolean isvertical)
          imports an array of datetimes into worksheet.
 int insertarray(java.lang.double[] doublearray, int firstrow, int firstcolumn, boolean isvertical)
          imports an array of doubles into a worksheet.
 int insertarray(int[] intarray, int firstrow, int firstcolumn, boolean isvertical)
          imports an array of integer into a worksheet.
 int insertarray(java.lang.object[][] objectarray, int firstrow, int firstcolumn)
          imports an array of objects into a worksheet.
 int insertarray(java.lang.object[] arrobject, int firstrow, int firstcolumn, boolean isvertical)
          imports an array of objects into a worksheet.
 int insertarray(java.lang.string[] stringarray, int firstrow, int firstcolumn, boolean isvertical)
          imports an array of strings into a worksheet.
 int insertarraylist(java.util.arraylist arraylist, int firstrow, int firstcolumn, boolean isvertical)
          imports an arraylist of data into a worksheet.
int
insertarrayt(t[] objects, int firstrow, int firstcolumn, boolean isvertical)
          imports an array of objects into a worksheet.
 void insertcolumn(int columnindex)
          inserts a new column into the worksheet.
 void insertcolumn(int columnindex, int columncount)
          inserts specified columns into the worksheet.
 void insertcolumn(int columnindex, int columncount, insertoptionstype insertoptions)
          inserts an empty column with default formatting.
 int insertdatacolumn(datacolumn datacolumn, boolean columnheaders, int firstrow, int firstcolumn)
          imports data column.
 int insertdatacolumns(datacolumn[] datacolumns, boolean columnheaders, int firstrow, int firstcolumn)
          imports array of data columns.
 int insertdatatable(datatable datatable, boolean columnheaders, int firstrow, int firstcolumn)
          imports data from a datatable into worksheet
 int insertdatatable(datatable datatable, boolean columnheaders, int firstrow, int firstcolumn, boolean transtypes)
          imports data from a datatable into worksheet.
 int insertdatatable(datatable datatable, boolean columnheaders, int firstrow, int firstcolumn, int maxrows, int maxcolumns)
          imports data from a datatable into worksheet.
 int insertdatatable(datatable datatable, boolean columnheaders, int firstrow, int firstcolumn, int maxrows, int maxcolumns, boolean transtypes)
          imports data from a datatable into worksheet.
 int insertdatatable(datatable datatable, boolean columnheaders, int firstrow, int firstcolumn, int maxrows, int maxcolumns, datacolumn[] columnsarray, boolean transtypes)
          imports data from a datatable into worksheet
 int insertdataview( dataview, boolean columnheaders, int firstrow, int firstcolumn)
          imports data from a dataview into worksheet.
 int insertdataview( dataview, boolean columnheaders, int firstrow, int firstcolumn, boolean transtypes)
          imports data from a dataview into worksheet.
 int insertdataview( dataview, boolean columnheaders, int firstrow, int firstcolumn, int maxrows, int maxcolumns)
          imports data from a dataview into worksheet.
 int insertdataview( dataview, boolean columnheaders, int firstrow, int firstcolumn, int maxrows, int maxcolumns, boolean transtypes)
          imports data from a dataview into worksheet.
 ixlsrange insertrange(int rowindex, int columnindex, int rowcount, int columncount, insertmoveoption moveoptions, insertoptionstype insertoptions)
          insert a cell range into worksheet
 void insertrow(int rowindex)
          inserts a new row into the worksheet.
 void insertrow(int rowindex, int rowcount)
          inserts multiple rows into the worksheet.
 void insertrow(int rowindex, int rowcount, insertoptionstype insertoptions)
          inserts an empty row with default formatting.
 boolean isarrayformula(long cellindex)
          indicates whether cell contains array-entered formula.
 boolean iscolumnvisible(int columnindex)
          indicates whether column is visible.
 boolean isdisplayzeros()
          indicates whether zero values to be displayed
 void isdisplayzeros(boolean value)
          sets whether zero values to be displayed
 boolean isempty()
          indicates whether worksheet is empty.
 boolean isexternalformula(int row, int column)
          indicates is formula in cell is formula to external workbook.
 boolean isfreezepanes()
          indicates whether freezed panes are applied.
 boolean isrowvisible(int rowindex)
          indicates whether row is visible.
 boolean isstringspreserved()
          indicates if all values in the workbook are preserved as strings.
 void isstringspreserved(boolean value)
          indicates if all values in the workbook are preserved as strings.
 void moveworksheet(int destindex)
          moves worksheet into new position.
 double pixelstocolumnwidth(double pixels)
          converts pixels count into column width value.
 void remove()
          removes worksheet from parernt worksheets collection.
 void removemergedcells(ixlsrange range)
           
 void removepanes()
          removes panes from a worksheet.
 void replace(java.lang.string oldvalue, datacolumn column, boolean columnheaders)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, datatable newvalues, boolean columnheaders)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, java.util.date newvalue)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, double newvalue)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, double[] newvalues, boolean isvertical)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, int[] newvalues, boolean isvertical)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, java.lang.string newvalue)
          replaces cells' values with new data.
 void replace(java.lang.string oldvalue, java.lang.string[] newvalues, boolean isvertical)
          replaces cells' values with new data.
 void savetoemfimage(java.lang.string filepath, int firstrow, int firstcolumn, int lastrow, int lastcolumn, int emftype)
          saves specific range into emf format image.
 void savetofile(java.lang.string filename, java.lang.string separator)
          saves specific worksheet to file.
 void savetofile(java.lang.string filename, java.lang.string separator, boolean retainhiddendata)
          save worksheet to file.
 void savetofile(java.lang.string filename, java.lang.string separator, java.nio.charset.charset encoding)
          saves specific worksheet to file.
 void savetohtml(java.io.outputstream stream, htmloptions saveoption)
          saves specific work sheet to html.
 void savetohtml(java.lang.string filename)
          saves specific worksheet to html file.
 void savetohtml(java.lang.string filename, htmloptions saveoption)
          saves specific worksheet to html.
 void savetoimage(java.lang.string filename)
          saves specific worksheet to image.
 void savetoimage(java.lang.string filename, int firstrow, int firstcolumn, int lastrow, int lastcolumn)
          saves specific worksheet to image.
 void savetopdf(java.lang.string filename)
          saves specific worksheet to pdf.
 void savetopdfstream(java.io.outputstream outputstream)
          saves specific worksheet to pdf stream.
 void savetostream(java.io.outputstream stream, java.lang.string separator)
          saves specific worksheet to stream.
 void savetostream(java.io.outputstream stream, java.lang.string separator, boolean retainhiddendata)
          save worksheet to stream.
 void savetostream(java.io.outputstream stream, java.lang.string separator, java.nio.charset.charset charset)
          saves specific worksheet to stream.
 void savetotiff(java.lang.string filename)
           
 void savetotiff(java.lang.string filename, int firstrow, int firstcolumn, int lastrow, int lastcolumn)
           
 void setactivecell(ixlsrange range, boolean updateapplication)
          sets active cell
 void setactivepane(int value)
          gets or sets index of the active pane.
 void setblank(int irow, int icolumn)
          sets blank in specified cell.
 void setboolean(int irow, int icolumn, boolean value)
          sets value in the specified cell.
 void setcaculatevalue(java.lang.object value, int row, int col)
          sets the value of a cell.
 void setcellvalue(int rowindex, int columnindex, boolean boolvalue)
          sets value in the specified cell.
 void setcellvalue(int rowindex, int columnindex, java.lang.string stringvalue)
          sets value in the specified cell.
 void setcolumnwidth(int columnindex, double width)
          sets column width
 void setcolumnwidthinpixels(int icolumn, int value)
          sets column width in pixels.
 void setcolumnwidthinpixels(int columnindex, int count, int value)
          sets the width of the specified columns.
 void setdefaultcolumnstyle(int firstcolumnindex, int lastcolumnindex, istyle defaultstyle)
          sets by column index default style for column.
 void setdefaultcolumnstyle(int columnindex, istyle defaultstyle)
          sets default style for column.
 void setdefaultcolumnwidth(double value)
          returns or sets the default width of all the columns in the worksheet.
 void setdefaultprintrowheight(int value)
          return default row height in pixel.
 void setdefaultrowheight(double value)
          gets or sets default height of all the rows in the worksheet, in points.
 void setdefaultrowstyle(int firstrowindex, int lastrowindex, istyle defaultstyle)
          sets by column index default style for row.
 void setdefaultrowstyle(int rowindex, istyle defaultstyle)
          sets bdefault style for row.
 void setdisplaypagebreaks(boolean value)
          true if page breaks (both automatic and manual) on the specified worksheet are displayed.
 void seterror(int irow, int icolumn, java.lang.string value, boolean issettext)
           
 void setfirstcolumn(int columnindex)
          updates first column indexe.
 void setfirstrow(int rowindex)
          updates first row index.
 void setfirstvisiblecolumn(int value)
          index to first visible column in right pane(s).
 void setfirstvisiblerow(int value)
          index to first visible row in bottom pane(s).
 void setformula(int irow, int icolumn, java.lang.string value)
          sets formula in the specified cell.
 void setformula(int irow, int icolumn, java.lang.string value, boolean bisr1c1)
          sets formula in the specified cell.
 void setformulaboolvalue(int irow, int icolumn, boolean value)
          sets formula bool value.
 void setformulaerrorvalue(int irow, int icolumn, java.lang.string value)
          sets formula error value.
 void setformulanumbervalue(int irow, int icolumn, double value)
          sets formula number value.
 void setformulastringvalue(int irow, int icolumn, java.lang.string value)
          sets formula string value.
 void setgridlinesvisible(boolean value)
          true if gridlines are visible; false otherwise.
 void sethorizontalsplit(int value)
          position of the horizontal split (py, 0 = no horizontal split): unfrozen pane: height of the top pane(s) (in twips = 1/20 of a point) frozen pane: number of visible rows in top pane(s)
 void setlastcolumn(int columnindex)
          updates last column index.
 void setlastrow(int rowindex)
          updates last row index.
 void setnumber(int irow, int icolumn, double value)
          sets value in the specified cell.
 void setrowcolumnheadersvisible(boolean value)
          true if row and column headers are visible.
 void setrowheight(int rowindex, double height)
          sets the height of the specified row.
 void setrowheightinpixels(int rowindex, int count, double value)
          set row height from start row index
 void setrowheightpixels(int rowindex, double height)
          sets the height of the specified row.
 void setstandardheightflag(boolean value)
          gets or sets the standard (default) height option flag, which defines that standard (default) row height and book default font height do not match.
 void settext(int irow, int icolumn, java.lang.string value)
          sets text in the specified cell.
 void settopleftcell(cellrange value)
          sets top left cell of the worksheet.
 void setuserangescache(boolean value)
          indicates whether all created range objects should be cached.
 void setverticalsplit(int value)
          position of the vertical split (px, 0 = no vertical split): unfrozen pane: width of the left pane(s) (in twips = 1/20 of a point) frozen pane: number of visible columns in left pane(s)
 void setviewmode(viewmode viewmode)
          sets the view mode of the sheet.
 void setzoom(int zoom)
          sets zoom factor of document.
 void setzoomscalenormal(int value)
          gets or sets the zoom scale of normal view of the sheet.
 void setzoomscalepagebreakview(int value)
          gets or sets the zoom scale of page break preview of the sheet.
 void setzoomscalepagelayoutview(int value)
          gets or sets the zoom scale of page layout view of the sheet.
 void showcolumn(int columnindex)
          shows a column.
 void showrow(int rowindex)
          shows a row.
 java.awt.image.bufferedimage toimage(int firstrow, int firstcolumn, int lastrow, int lastcolumn)
          saves specific worksheet to image.
 void tosvgstream(java.io.outputstream outputstream, int firstrow, int firstcolumn, int lastrow, int lastcolumn)
          saves specific cell ranges to svg stream
 cellrange ungroupbycolumns(int firstcolumn, int lastcolumn)
          ungroups columns.
 cellrange ungroupbyrows(int firstrow, int lastrow)
          ungroups rows.
 
methods inherited from class com.spire.xls.core.spreadsheet.xlsworksheetbase
activate, getarcshapes, getbuttonshapes, getcharts, getcheckboxes, getcodename, getcomboboxes, getcomments, getdefaultgridlinecolor, getfirstcolumn, getfirstrow, getgridlinecolor, getgroupboxes, getheaderfootershapes, getindex, getlabelshapes, getlastcolumn, getlastrow, getleftvisiblecolumn, getlines, getlistboxes, getname, getovalshapes, getparentworkbook, getpictures, 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, getcells, getcodename, getcomments, getgridlinecolor, getindex, getleftvisiblecolumn, gettopvisiblerow, protect, savetoimage, savetoimage, savetoimage, savetostream, seterror, setgridlinecolor, setleftvisiblecolumn, settopvisiblerow, setvalue, unprotect
 
constructor detail

xlsworksheet

public xlsworksheet(java.lang.object parent)
method detail

getoleobjects

public ioleobjects getoleobjects()
gets the ole objects.
specified by:
getoleobjects in interface iworksheet

getautofilters

public  getautofilters()
returns collection of worksheet's autofilters. read-only.
specified by:
getautofilters in interface iworksheet

getcelllist

public java.util.arraylist<cellrange> getcelllist()
returns all used cells in the worksheet. read-only.

getdisplaypagebreaks

public boolean getdisplaypagebreaks()
true if page breaks (both automatic and manual) on the specified worksheet are displayed.
specified by:
getdisplaypagebreaks in interface iworksheet

setdisplaypagebreaks

public void setdisplaypagebreaks(boolean value)
true if page breaks (both automatic and manual) on the specified worksheet are displayed.

getmergedcells

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

getnames

public inameranges getnames()
name range used by macros to access to workbook items.
specified by:
getnames in interface iworksheet

getpagesetup

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

getallocatedrange

public ixlsrange getallocatedrange()
read-only. returns a range object that represents a cell or a range of cells.
specified by:
getallocatedrange in interface iworksheet

getrows

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

getcolumns

public ixlsrange[] getcolumns()
for a worksheet object, returns an array of range objects that represents all used columns on the specified worksheet. read-only range object.
specified by:
getcolumns in interface iworksheet

getconditionalformats

public iconditionalformatscollection getconditionalformats()
returns collection with all conditional formats in the worksheet. read-only.
returns:

getdefaultrowheight

public double getdefaultrowheight()
gets or sets default height of all the rows in the worksheet, in points. double.
specified by:
getdefaultrowheight in interface iworksheet

setdefaultrowheight

public void setdefaultrowheight(double value)
gets or sets default height of all the rows in the worksheet, in points. double.
specified by:
setdefaultrowheight in interface iworksheet

getdefaultprintrowheight

public int getdefaultprintrowheight()
return default row height in pixel.

setdefaultprintrowheight

public void setdefaultprintrowheight(int value)
return default row height in pixel.

getviewmode

public viewmode getviewmode()
gets or sets the view mode of the sheet.

setviewmode

public void setviewmode(viewmode viewmode)
sets the view mode of the sheet.

getdefaultcolumnwidth

public double getdefaultcolumnwidth()
returns or sets the default width of all the columns in the worksheet. read/write double.
specified by:
getdefaultcolumnwidth in interface iworksheet

setdefaultcolumnwidth

public void setdefaultcolumnwidth(double value)
returns or sets the default width of all the columns in the worksheet. read/write double.
specified by:
setdefaultcolumnwidth in interface iworksheet

getzoom

public int getzoom()
zoom factor of document. value of zoom should be between 10 and 400.
specified by:
getzoom in interface iworksheet
overrides:
getzoom in class xlsworksheetbase

setzoom

public void setzoom(int zoom)
sets zoom factor of document. value of zoom should be between 10 and 400.
specified by:
setzoom in interface iworksheet
overrides:
setzoom in class xlsworksheetbase

getzoomscalenormal

public int getzoomscalenormal()
gets or sets the zoom scale of normal view of the sheet.

setzoomscalenormal

public void setzoomscalenormal(int value)
gets or sets the zoom scale of normal view of the sheet.

getzoomscalepagebreakview

public int getzoomscalepagebreakview()
gets or sets the zoom scale of page break preview of the sheet.

setzoomscalepagebreakview

public void setzoomscalepagebreakview(int value)
gets or sets the zoom scale of page break preview of the sheet.

getzoomscalepagelayoutview

public int getzoomscalepagelayoutview()
gets or sets the zoom scale of page layout view of the sheet.

setzoomscalepagelayoutview

public void setzoomscalepagelayoutview(int value)
gets or sets the zoom scale of page layout view of the sheet.

getselectioncount

public int getselectioncount()
gets array with selection count. read-only.

getversion

public excelversion getversion()
gets or sets excel file version.

getsparklinegroups

public sparklinegroupcollection getsparklinegroups()
gets the sparkline groups.
returns:
the sparkline groups.

getstandardheightflag

public boolean getstandardheightflag()
gets or sets the standard (default) height option flag, which defines that standard (default) row height and book default font height do not match. bool.

setstandardheightflag

public void setstandardheightflag(boolean value)
gets or sets the standard (default) height option flag, which defines that standard (default) row height and book default font height do not match. bool.

gettype

public excelsheettype gettype()
returns or sets the worksheet type.
specified by:
gettype in interface iworksheet

getrange

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

get

public ixlsrange get(int row,
                     int column)
get cell by row and index.
specified by:
get in interface iworksheet

get

public ixlsrange get(int row,
                     int column,
                     int lastrow,
                     int lastcolumn)
get cell range.
specified by:
get in interface iworksheet

get

public ixlsrange get(java.lang.string name)
get cell range.
specified by:
get in interface iworksheet

gettopleftcell

public cellrange gettopleftcell()
gets top left cell of the worksheet.
returns:

settopleftcell

public void settopleftcell(cellrange value)
sets top left cell of the worksheet.

getuserangescache

public boolean getuserangescache()
indicates whether all created range objects should be cached. default value is true.
specified by:
getuserangescache in interface iworksheet

setuserangescache

public void setuserangescache(boolean value)
indicates whether all created range objects should be cached. default value is true.

getverticalsplit

public int getverticalsplit()
description copied from interface: iworksheet
position of the vertical split (px, 0 = no vertical split): unfrozen pane: width of the left pane(s) (in twips = 1/20 of a point) frozen pane: number of visible columns in left pane(s)
specified by:
getverticalsplit in interface iworksheet

setverticalsplit

public void setverticalsplit(int value)
description copied from interface: iworksheet
position of the vertical split (px, 0 = no vertical split): unfrozen pane: width of the left pane(s) (in twips = 1/20 of a point) frozen pane: number of visible columns in left pane(s)
specified by:
setverticalsplit in interface iworksheet

getvpagebreaks

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

getactivepane

public int getactivepane()
gets or sets index of the active pane.
specified by:
getactivepane in interface iworksheet

setactivepane

public void setactivepane(int value)
gets or sets index of the active pane.
specified by:
setactivepane in interface iworksheet

setfirstcolumn

public void setfirstcolumn(int columnindex)
updates first column indexe.
overrides:
setfirstcolumn in class xlsworksheetbase
parameters:
columnindex - column index

setlastcolumn

public void setlastcolumn(int columnindex)
updates last column index.
overrides:
setlastcolumn in class xlsworksheetbase
parameters:
columnindex - column index.

setfirstrow

public void setfirstrow(int rowindex)
updates first row index.
overrides:
setfirstrow in class xlsworksheetbase
parameters:
rowindex - row index.

setlastrow

public void setlastrow(int rowindex)
updates last row index.
overrides:
setlastrow in class xlsworksheetbase
parameters:
rowindex - row index.

showcolumn

public void showcolumn(int columnindex)
shows a column.
parameters:
columnindex - column index.

showrow

public void showrow(int rowindex)
shows a row.
parameters:
rowindex - row index.

setactivecell

public void setactivecell(ixlsrange range,
                          boolean updateapplication)
sets active cell
parameters:
range - cell to activate.

getfirstvisiblecolumn

public int getfirstvisiblecolumn()
description copied from interface: iworksheet
index to first visible column in right pane(s).
specified by:
getfirstvisiblecolumn in interface iworksheet

setfirstvisiblecolumn

public void setfirstvisiblecolumn(int value)
description copied from interface: iworksheet
index to first visible column in right pane(s).
specified by:
setfirstvisiblecolumn in interface iworksheet

getfirstvisiblerow

public int getfirstvisiblerow()
description copied from interface: iworksheet
index to first visible row in bottom pane(s).
specified by:
getfirstvisiblerow in interface iworksheet

setfirstvisiblerow

public void setfirstvisiblerow(int value)
description copied from interface: iworksheet
index to first visible row in bottom pane(s).
specified by:
setfirstvisiblerow in interface iworksheet

getgridlinesvisible

public boolean getgridlinesvisible()
true if gridlines are visible; false otherwise.
specified by:
getgridlinesvisible in interface iworksheet

setgridlinesvisible

public void setgridlinesvisible(boolean value)
true if gridlines are visible; false otherwise.
specified by:
setgridlinesvisible in interface iworksheet

hasmergedcells

public boolean hasmergedcells()
indicates whether worksheet has merged cells.

hasoleobjects

public boolean hasoleobjects()
indicats whether there is ole object.
specified by:
hasoleobjects in interface iworksheet

gethorizontalsplit

public int gethorizontalsplit()
description copied from interface: iworksheet
position of the horizontal split (py, 0 = no horizontal split): unfrozen pane: height of the top pane(s) (in twips = 1/20 of a point) frozen pane: number of visible rows in top pane(s)
specified by:
gethorizontalsplit in interface iworksheet

sethorizontalsplit

public void sethorizontalsplit(int value)
description copied from interface: iworksheet
position of the horizontal split (py, 0 = no horizontal split): unfrozen pane: height of the top pane(s) (in twips = 1/20 of a point) frozen pane: number of visible rows in top pane(s)
specified by:
sethorizontalsplit in interface iworksheet

gethpagebreaks

public ihpagebreaks gethpagebreaks()
returns an hpagebreaks collection that represents the horizontal page breaks on the sheet. read-only.
specified by:
gethpagebreaks in interface iworksheet

gethyperlinks

public ihyperlinks gethyperlinks()
collection of all worksheet's hyperlinks.
specified by:
gethyperlinks in interface iworksheet

isdisplayzeros

public boolean isdisplayzeros()
indicates whether zero values to be displayed
specified by:
isdisplayzeros in interface iworksheet

isdisplayzeros

public void isdisplayzeros(boolean value)
sets whether zero values to be displayed
specified by:
isdisplayzeros in interface iworksheet

isempty

public boolean isempty()
indicates whether worksheet is empty. read-only.

isfreezepanes

public boolean isfreezepanes()
indicates whether freezed panes are applied.

isstringspreserved

public boolean isstringspreserved()
indicates if all values in the workbook are preserved as strings.
specified by:
isstringspreserved in interface iworksheet

isstringspreserved

public void isstringspreserved(boolean value)
indicates if all values in the workbook are preserved as strings.
specified by:
isstringspreserved in interface iworksheet

addalloweditrange

public boolean addalloweditrange(java.lang.string title,
                                 cellrange range,
                                 java.lang.string password)
adds a range of cells that allow editing
parameters:
title - title
range - range
password - password

addalloweditrange

public boolean addalloweditrange(java.lang.string title,
                                 cellrange range)
add a range of cells that allow editing
parameters:
title - title
range - range

getlistobjects

public ilistobjects getlistobjects()
returns all list objects in the worksheet.
specified by:
getlistobjects in interface iworksheet

getrowcolumnheadersvisible

public boolean getrowcolumnheadersvisible()
true if row and column headers are visible. false otherwise.
specified by:
getrowcolumnheadersvisible in interface iworksheet

setrowcolumnheadersvisible

public void setrowcolumnheadersvisible(boolean value)
true if row and column headers are visible. false otherwise.
specified by:
setrowcolumnheadersvisible in interface iworksheet

getprotectcontents

public boolean getprotectcontents()
indicates whether current sheet is protected.
overrides:
getprotectcontents in class xlsworksheetbase

getpivottables

public pivottablescollection getpivottables()
returns pivot table collection. read-only.
specified by:
getpivottables in interface iworksheet

getquotedname

public java.lang.string getquotedname()
returns quoted name of the worksheet.

getdvtable

public idatavalidationtable getdvtable()

getcaculatevalue

public java.lang.object getcaculatevalue(int row,
                                         int col)
returns the formula string if the cell contains a formula, or the value if the cell cantains anything other than a formula.
parameters:
row - the row of the cell.
col - the column of the cell.
returns:
the formula string or value.

setcaculatevalue

public void setcaculatevalue(java.lang.object value,
                             int row,
                             int col)
sets the value of a cell.
parameters:
value - the value to be set.
row - the row of the cell.
col - the column of the cell.

insertarray

public int insertarray(java.util.date[] datearray,
                       int firstrow,
                       int firstcolumn,
                       boolean isvertical)
imports an array of datetimes into worksheet.
specified by:
insertarray in interface iworksheet
parameters:
datearray - datetime array.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
isvertical - specifies to import data vertically or horizontally.
returns:

insertarray

public int insertarray(java.lang.double[] doublearray,
                       int firstrow,
                       int firstcolumn,
                       boolean isvertical)
imports an array of doubles into a worksheet.
specified by:
insertarray in interface iworksheet
parameters:
doublearray - double array
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
isvertical - specifies to import data vertically or horizontally.
returns:

insertarrayt

public  int insertarrayt(t[] objects,
                            int firstrow,
                            int firstcolumn,
                            boolean isvertical)
imports an array of objects into a worksheet.
parameters:
objects - object array.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
isvertical - specifies to import data vertically or horizontally.
returns:

insertarray

public int insertarray(int[] intarray,
                       int firstrow,
                       int firstcolumn,
                       boolean isvertical)
imports an array of integer into a worksheet.
specified by:
insertarray in interface iworksheet
parameters:
intarray - integer array.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
isvertical - specifies to import data vertically or horizontally.
returns:

insertarray

public int insertarray(java.lang.object[][] objectarray,
                       int firstrow,
                       int firstcolumn)
imports an array of objects into a worksheet.
specified by:
insertarray in interface iworksheet
parameters:
objectarray - object array.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
returns:

insertarray

public int insertarray(java.lang.string[] stringarray,
                       int firstrow,
                       int firstcolumn,
                       boolean isvertical)
imports an array of strings into a worksheet.
specified by:
insertarray in interface iworksheet
parameters:
stringarray - string array.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
isvertical - specifies to import data vertically or horizontally.
returns:

insertarray

public int insertarray(java.lang.object[] arrobject,
                       int firstrow,
                       int firstcolumn,
                       boolean isvertical)
imports an array of objects into a worksheet.
specified by:
insertarray in interface iworksheet
parameters:
arrobject - array to import.
firstrow - the row number of the first cell to import in
firstcolumn - the column number of the first cell to import in.
isvertical - true if array should be imported vertically; false - horizontally.
returns:
number of imported elements.

insertarraylist

public int insertarraylist(java.util.arraylist arraylist,
                           int firstrow,
                           int firstcolumn,
                           boolean isvertical)
imports an arraylist of data into a worksheet.
parameters:
arraylist - data arraylist.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
isvertical - specifies to import data vertically or horizontally.
returns:

insertdatacolumn

public int insertdatacolumn(datacolumn datacolumn,
                            boolean columnheaders,
                            int firstrow,
                            int firstcolumn)
imports data column.
specified by:
insertdatacolumn in interface iworksheet
parameters:
datacolumn - data column to import.
columnheaders - indicates whether to import field names.
firstrow - index of the first row.
firstcolumn - index of the first column
returns:

insertdatacolumns

public int insertdatacolumns(datacolumn[] datacolumns,
                             boolean columnheaders,
                             int firstrow,
                             int firstcolumn)
imports array of data columns.
parameters:
datacolumns - data columns to import.
columnheaders - indicates whether to import field names.
firstrow - index to the first row.
firstcolumn - index to the first column.
returns:

insertdatatable

public int insertdatatable(datatable datatable,
                           boolean columnheaders,
                           int firstrow,
                           int firstcolumn)
imports data from a datatable into worksheet
specified by:
insertdatatable in interface iworksheet
parameters:
datatable - datatable
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
returns:

insertdatatable

public int insertdatatable(datatable datatable,
                           boolean columnheaders,
                           int firstrow,
                           int firstcolumn,
                           boolean transtypes)
imports data from a datatable into worksheet.
specified by:
insertdatatable in interface iworksheet
parameters:
datatable - datatable
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
transtypes - indicates if preserve types when insert data into worksheet
returns:

insertdatatable

public int insertdatatable(datatable datatable,
                           boolean columnheaders,
                           int firstrow,
                           int firstcolumn,
                           int maxrows,
                           int maxcolumns)
imports data from a datatable into worksheet.
specified by:
insertdatatable in interface iworksheet
parameters:
datatable - datatable
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
maxrows - maximum number of rows to import
maxcolumns - maximum number of columns to import
returns:

insertdatatable

public int insertdatatable(datatable datatable,
                           boolean columnheaders,
                           int firstrow,
                           int firstcolumn,
                           int maxrows,
                           int maxcolumns,
                           boolean transtypes)
imports data from a datatable into worksheet.
specified by:
insertdatatable in interface iworksheet
parameters:
datatable - datatable
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
maxrows - maximum number of rows to import
maxcolumns - maximum number of columns to import
transtypes - indicates if preserve types when insert data into worksheet
returns:

insertdatatable

public int insertdatatable(datatable datatable,
                           boolean columnheaders,
                           int firstrow,
                           int firstcolumn,
                           int maxrows,
                           int maxcolumns,
                           datacolumn[] columnsarray,
                           boolean transtypes)
imports data from a datatable into worksheet
parameters:
datatable - datatable
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
maxrows - maximum number of rows to import
maxcolumns - maximum number of columns to import
columnsarray - array of columns to import.
transtypes - indicates if preserve types when insert data into worksheet.true is default
returns:

importdatatable

public int importdatatable(java.lang.object[][] data,
                           boolean includeheaders,
                           int firstrow,
                           int firstcolumn)
imports data from a datatable into worksheet
parameters:
data - data
includeheaders - indicates whether to have headers data.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
returns:

importdatatable

public int importdatatable(java.lang.object[][] data,
                           boolean includeheaders,
                           int firstrow,
                           int firstcolumn,
                           int maxrows,
                           int maxcolumns)
imports data from a datatable into worksheet
parameters:
data - data
includeheaders - indicates whether to have headers data.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
maxrows - maximum number of rows to import
maxcolumns - maximum number of columns to import
returns:

insertdataview

public int insertdataview( dataview,
                          boolean columnheaders,
                          int firstrow,
                          int firstcolumn)
imports data from a dataview into worksheet.
specified by:
insertdataview in interface iworksheet
parameters:
dataview - data view object
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
returns:

insertdataview

public int insertdataview( dataview,
                          boolean columnheaders,
                          int firstrow,
                          int firstcolumn,
                          boolean transtypes)
imports data from a dataview into worksheet.
specified by:
insertdataview in interface iworksheet
parameters:
dataview - dataview object.
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
transtypes - indicates if preserve types when insert data into worksheet.
returns:

insertdataview

public int insertdataview( dataview,
                          boolean columnheaders,
                          int firstrow,
                          int firstcolumn,
                          int maxrows,
                          int maxcolumns)
imports data from a dataview into worksheet.
specified by:
insertdataview in interface iworksheet
parameters:
dataview - dataview object.
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
maxrows - maximum number of rows to import.
maxcolumns - maximum number of columns to import.
returns:

insertdataview

public int insertdataview( dataview,
                          boolean columnheaders,
                          int firstrow,
                          int firstcolumn,
                          int maxrows,
                          int maxcolumns,
                          boolean transtypes)
imports data from a dataview into worksheet.
specified by:
insertdataview in interface iworksheet
parameters:
dataview - dataview object.
columnheaders - indicates whether to import field names.
firstrow - the row number of the first cell to import in.
firstcolumn - the column number of the first cell to import in.
maxrows - maximum number of rows to import.
maxcolumns - maximum number of columns to import.
transtypes - indicates if preserve types when insert data into worksheet.
returns:

iscolumnvisible

public boolean iscolumnvisible(int columnindex)
indicates whether column is visible.
specified by:
iscolumnvisible in interface iworksheet
parameters:
columnindex - column index.
returns:
true - visible, otherwise false.

isexternalformula

public boolean isexternalformula(int row,
                                 int column)
indicates is formula in cell is formula to external workbook.
parameters:
row - represents row index.
column - represents column index.
returns:
if contain extern formula returns true; otherwise false.

isrowvisible

public boolean isrowvisible(int rowindex)
indicates whether row is visible.
specified by:
isrowvisible in interface iworksheet
parameters:
rowindex - row index.
returns:
true - visible, otherwise false.

autofitcolumn

public void autofitcolumn(int columnindex)
automatically fit the column width.
specified by:
autofitcolumn in interface iworksheet
parameters:
columnindex - column index.

autofitcolumn

public void autofitcolumn(int columnindex,
                          int firstrow,
                          int lastrow)
automatically fit column.
parameters:
columnindex - column index.
firstrow - one-based index of the first row to be used for autofit operation.
lastrow - one-based index of the last row to be used for autofit operation.

autofitrow

public void autofitrow(int rowindex)
automatically fit column width.
specified by:
autofitrow in interface iworksheet
parameters:
rowindex - row index

autofitrow

public void autofitrow(int rowindex,
                       int firstcolumn,
                       int lastcolumn,
                       boolean braiseevents)
automatically fit row.
parameters:
rowindex - row index
braiseevents - if true then raise events.

checkexistence

public boolean checkexistence(int row,
                              int column)
indicates whether cell has been initialized.
specified by:
checkexistence in interface iworksheet
parameters:
row - row index.
column - column index.
returns:

clear

public void clear()
clears data the worksheet.
specified by:
clear in interface iworksheet

cleardata

public void cleardata()
clears contents of a range.
specified by:
cleardata in interface iworksheet

columnwidthtopixels

public int columnwidthtopixels(double widthinchars)
converts column width into pixels.
specified by:
columnwidthtopixels in interface iworksheet
parameters:
widthinchars - column width to convert.
returns:
column width in pixels.

getcelltype

public xlsworksheet.trangevaluetype getcelltype(int row,
                                                int column,
                                                boolean bneedformulasubtype)
gets cell type from current column.
parameters:
row - indicates row.
column - indicates column.
bneedformulasubtype - indicates is need to indified formula sub type.
returns:
returns cell type.

getclonedobject

public  getclonedobject(java.util.hashmap hashnewnames,
                                          xlsworkbook book)
gets object that is clone of current worksheet in the specified workbook.
parameters:
hashnewnames - dictionary with update worksheet names.
book - new workbook object.
returns:
object that is clone of the current worksheet.

getstringvalue

public java.lang.string getstringvalue(long cellindex)
returns string value corresponding to the cell.
parameters:
cellindex - cell index to get value from.
returns:
string contained by the cell.

gettextobject

public java.lang.object gettextobject(long cellindex)
returns textwithformat object corresponding to the specified cell.
parameters:
cellindex - cell index.
returns:
object corresponding to the specified cell.

hasarrayformula

public boolean hasarrayformula(long cellindex)
indicates whether cell contains array-entered formula.
parameters:
cellindex - cell index.
returns:

hasarrayformularecord

public boolean hasarrayformularecord(int row,
                                     int column)
indicates is has array formula.
parameters:
row - represents row index.
column - represents column index.
returns:
indicates is contain array formula record.

insertrange

public ixlsrange insertrange(int rowindex,
                             int columnindex,
                             int rowcount,
                             int columncount,
                             insertmoveoption moveoptions,
                             insertoptionstype insertoptions)
insert a cell range into worksheet
parameters:
rowindex - the cell range first row index
columnindex - the cell range first column index
rowcount - the number of rows
columncount - the number of columns
moveoptions - insert options.
insertoptions - move the cell on the right to right or move the cell below down
returns:
return the range that insert into worksheet

isarrayformula

public boolean isarrayformula(long cellindex)
indicates whether cell contains array-entered formula.
parameters:
cellindex - cell index to check.
returns:
true if cell contains array-entered formula.

createnamedranges

public void createnamedranges(java.lang.string namedrange,
                              java.lang.string referrange,
                              boolean vertical)
create named ranges
specified by:
createnamedranges in interface iworksheet
parameters:
namedrange - names to create
referrange - refers to range
vertical - true if data are vertically placed in the sheet.

deletecolumn

public void deletecolumn(int columnindex)
deletes a column.
specified by:
deletecolumn in interface iworksheet
parameters:
columnindex - column index to remove..

deletecolumn

public void deletecolumn(int index,
                         int count)
removes specified column.
parameters:
index - one-based column index to remove.
count - number of columns to remove.

deleterow

public void deleterow(int index)
delete a row.
specified by:
deleterow in interface iworksheet
parameters:
index - row index to remove

deleterow

public void deleterow(int index,
                      int count)
removes specified row.
parameters:
index - one-based row index to remove
count - number of rows to delete.

insertcolumn

public void insertcolumn(int columnindex)
inserts a new column into the worksheet.
parameters:
columnindex - column index

insertcolumn

public void insertcolumn(int columnindex,
                         int columncount,
                         insertoptionstype insertoptions)
inserts an empty column with default formatting.
parameters:
columnindex - index at which new column should be inserted
columncount - number of columns to insert.
insertoptions - insert options.

insertcolumn

public void insertcolumn(int columnindex,
                         int columncount)
inserts specified columns into the worksheet.
parameters:
columnindex - column index
columncount - number of columns to insert.

insertrow

public void insertrow(int rowindex)
inserts a new row into the worksheet.
parameters:
rowindex - index at which new row should be inserted

exportdatatable

public datatable exportdatatable()
exports worksheet data into a datatable
returns:
exported datatable.

exportdata

public java.lang.object[][] exportdata()
export sheet data to arrays data.
returns:

exportdata

public java.lang.object[][] exportdata(boolean computeformula)
export sheet data to arrays data.
parameters:
computeformula -
returns:

exportdata

public java.lang.object[][] exportdata(int firstrow,
                                       int firstcolumn,
                                       int maxrows,
                                       int maxcolumns,
                                       boolean computedformulavalue)
export sheet data.
parameters:
firstrow - export sheet first row,start with 1
firstcolumn - export sheet first column,start width 1
maxrows - export row count
maxcolumns - export column count
computedformulavalue - compute cell formula
returns:
cells's data array.

insertrow

public void insertrow(int rowindex,
                      int rowcount,
                      insertoptionstype insertoptions)
inserts an empty row with default formatting.
parameters:
rowindex - index at which new row should be inserted.
rowcount - number of rows to insert.
insertoptions - insert options.

insertrow

public void insertrow(int rowindex,
                      int rowcount)
inserts multiple rows into the worksheet.
parameters:
rowindex - index at which new row should be inserted
rowcount - number of rows to be inserted.

getboolean

public boolean getboolean(int row,
                          int column)
gets bool value from cell.
specified by:
getboolean in interface iworksheet
parameters:
row - represents row index.
column - represents column index.
returns:
returns found bool value. if cannot found returns false.

getcolumnwidth

public double getcolumnwidth(int columnindex)
gets the width of the specified column
parameters:
columnindex - column index
returns:
width of column

getcolumnwidthpixels

public int getcolumnwidthpixels(int columnindex)
gets the width of the specified column, in units of pixel.
specified by:
getcolumnwidthpixels in interface iworksheet
parameters:
columnindex - column index.
returns:
width of column

getdefaultcolumnstyle

public istyle getdefaultcolumnstyle(int columnindex)
returns default column style.
specified by:
getdefaultcolumnstyle in interface iworksheet
parameters:
columnindex - column index.
returns:
default column style or null if style wasn't set.

getdefaultrowstyle

public istyle getdefaultrowstyle(int rowindex)
returns default row style.
specified by:
getdefaultrowstyle in interface iworksheet
parameters:
rowindex - row index.
returns:
default row style or null if style wasn't set.

geterror

public java.lang.string geterror(int row,
                                 int column)
gets error value from cell.
specified by:
geterror in interface iworksheet
parameters:
row - row index.
column - column index.
returns:
returns error value or null.

getformulaerrorvalue

public java.lang.string getformulaerrorvalue(int row,
                                             int column)
gets formula error value from cell.
specified by:
getformulaerrorvalue in interface iworksheet
parameters:
row - row index.
column - column index.
returns:
returns error value or null.

getformulanumbervalue

public double getformulanumbervalue(int row,
                                    int column)
returns formula number value corresponding to the cell.
specified by:
getformulanumbervalue in interface iworksheet
parameters:
row - one-based row index of the cell to get value from.
column - one-based column index of the cell to get value from.
returns:
number contained by the cell.

getformulastringvalue

public java.lang.string getformulastringvalue(int row,
                                              int column)
returns formula string value corresponding to the cell.
specified by:
getformulastringvalue in interface iworksheet
parameters:
row - one-based row index of the cell to get value from.
column - one-based column index of the cell to get value from.
returns:
string contained by the cell.

getformula

public java.lang.string getformula(int row,
                                   int column,
                                   boolean br1c1)
returns formula corresponding to the cell.
specified by:
getformula in interface iworksheet
parameters:
row - one-based row index of the cell to get value from.
column - one-based column index of the cell to get value from.
br1c1 - indicates whether r1c1 notation should be used.
returns:
formula contained by the cell.

getformula

public java.lang.string getformula(int row,
                                   int column,
                                   boolean br1c1,
                                   boolean isforserialization)
returns formula corresponding to the cell.
parameters:
row - one-based row index of the cell to get value from.
column - one-based column index of the cell to get value from.
br1c1 - indicates whether r1c1 notation should be used.
returns:
formula contained by the cell.

getformulaboolvalue

public boolean getformulaboolvalue(int row,
                                   int column)
gets formula bool value from cell.
specified by:
getformulaboolvalue in interface iworksheet
parameters:
row - represents row index.
column - represents column index.
returns:
returns found bool value. if cannot found returns false.

getnumber

public double getnumber(int row,
                        int column)
returns number value corresponding to the cell.
specified by:
getnumber in interface iworksheet
parameters:
row - one-based row index of the cell to get value from.
column - one-based column index of the cell to get value from.
returns:
number contained by the cell.

getrowheight

public double getrowheight(int row)
gets the height of a specified row.
parameters:
row - row index.
returns:
height of row

hidecolumn

public void hidecolumn(int columnindex)
hides a column.
parameters:
columnindex - column index.

hiderow

public void hiderow(int rowindex)
hides a row.
parameters:
rowindex - row index.

getrowheightpixels

public int getrowheightpixels(int rowindex)
gets the height of a specified row in unit of pixel.
specified by:
getrowheightpixels in interface iworksheet
parameters:
rowindex - row index.
returns:
height of row

gettext

public java.lang.string gettext(int row,
                                int column)
returns string value corresponding to the cell.
specified by:
gettext in interface iworksheet
parameters:
row - one-based row index of the cell to get value from.
column - one-based column index of the cell to get value from.
returns:
string contained by the cell.

deleterange

public void deleterange(cellrange range,
                        deleteoption deleteoption)
delete a range in worksheet
parameters:
range - the range to be deleted
deleteoption - choose to move the right range to left or move the below range to above

moveworksheet

public void moveworksheet(int destindex)
moves worksheet into new position.
specified by:
moveworksheet in interface iworksheet
parameters:
destindex - destination index.

pixelstocolumnwidth

public double pixelstocolumnwidth(double pixels)
converts pixels count into column width value.
specified by:
pixelstocolumnwidth in interface iworksheet
parameters:
pixels - column width in pixels.
returns:
column width.

remove

public void remove()
removes worksheet from parernt worksheets collection.
specified by:
remove in interface iworksheet

removemergedcells

public void removemergedcells(ixlsrange range)
parameters:
range -

removepanes

public void removepanes()
removes panes from a worksheet.
specified by:
removepanes in interface iworksheet

replace

public void replace(java.lang.string oldvalue,
                    datacolumn column,
                    boolean columnheaders)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
column - data table with new data.
columnheaders - indicates whether to import field names.

replace

public void replace(java.lang.string oldvalue,
                    datatable newvalues,
                    boolean columnheaders)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalues - data table with new data.
columnheaders - indicates whether to import field names.

replace

public void replace(java.lang.string oldvalue,
                    java.util.date newvalue)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalue - new value for the range with specified string.

replace

public void replace(java.lang.string oldvalue,
                    double newvalue)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalue - new value for the range with specified string.

replace

public void replace(java.lang.string oldvalue,
                    double[] newvalues,
                    boolean isvertical)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalues - array of new values.
isvertical - indicates whether array should be inserted vertically.

replace

public void replace(java.lang.string oldvalue,
                    int[] newvalues,
                    boolean isvertical)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalues - array of new values.
isvertical - indicates whether array should be inserted vertically.

replace

public void replace(java.lang.string oldvalue,
                    java.lang.string newvalue)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalue - new value for the range with specified string.

replace

public void replace(java.lang.string oldvalue,
                    java.lang.string[] newvalues,
                    boolean isvertical)
replaces cells' values with new data.
specified by:
replace in interface iworksheet
parameters:
oldvalue - string value to replace.
newvalues - array of new values.
isvertical - indicates whether array should be inserted vertically.

savetoimage

public void savetoimage(java.lang.string filename,
                        int firstrow,
                        int firstcolumn,
                        int lastrow,
                        int lastcolumn)
saves specific worksheet to image.
parameters:
filename - file name
firstrow -
firstcolumn -
lastrow -
lastcolumn -

savetoimage

public void savetoimage(java.lang.string filename)
saves specific worksheet to image.
parameters:
filename - file name

savetotiff

public void savetotiff(java.lang.string filename)

savetotiff

public void savetotiff(java.lang.string filename,
                       int firstrow,
                       int firstcolumn,
                       int lastrow,
                       int lastcolumn)

toimage

public java.awt.image.bufferedimage toimage(int firstrow,
                                            int firstcolumn,
                                            int lastrow,
                                            int lastcolumn)
saves specific worksheet to image.
parameters:
firstrow - one-based index of the first row to convert.
firstcolumn - one-based index of the first column to convert.
lastrow - one-based index of the last row to convert.
lastcolumn - one-based index of the last column to convert.
returns:
bufferedimage

savetohtml

public void savetohtml(java.io.outputstream stream,
                       htmloptions saveoption)
saves specific work sheet to html.
parameters:
stream - the stream
saveoption - the option

savetohtml

public void savetohtml(java.lang.string filename)
saves specific worksheet to html file.
parameters:
filename - file name

savetohtml

public void savetohtml(java.lang.string filename,
                       htmloptions saveoption)
saves specific worksheet to html.
parameters:
filename - the filename
saveoption - the option

savetoemfimage

public void savetoemfimage(java.lang.string filepath,
                           int firstrow,
                           int firstcolumn,
                           int lastrow,
                           int lastcolumn,
                           int emftype)
saves specific range into emf format image.
parameters:
firstrow - one-based index of the first row to convert.
firstcolumn - one-based index of the first column to convert.
lastrow - one-based index of the last row to convert.
lastcolumn - one-based index of the last column to convert.
filepath - output file path
emftype - metafile emftype.

savetofile

public void savetofile(java.lang.string filename,
                       java.lang.string separator)
saves specific worksheet to file.
specified by:
savetofile in interface iworksheet
parameters:
filename - file name.
separator - seperator.

savetofile

public void savetofile(java.lang.string filename,
                       java.lang.string separator,
                       boolean retainhiddendata)
save worksheet to file.
parameters:
filename - file name.
separator - seperator.
retainhiddendata - retain hidden data

savetofile

public void savetofile(java.lang.string filename,
                       java.lang.string separator,
                       java.nio.charset.charset encoding)
saves specific worksheet to file.
parameters:
filename - file name.
separator - seperator.
encoding - encoding to use.

savetostream

public void savetostream(java.io.outputstream stream,
                         java.lang.string separator)
saves specific worksheet to stream.
parameters:
stream - stream object.
separator - seperator.

savetostream

public void savetostream(java.io.outputstream stream,
                         java.lang.string separator,
                         java.nio.charset.charset charset)
saves specific worksheet to stream.
parameters:
stream -
separator -
charset -

savetostream

public void savetostream(java.io.outputstream stream,
                         java.lang.string separator,
                         boolean retainhiddendata)
save worksheet to stream.
parameters:
stream - stream object.
separator - seperator.
retainhiddendata - retain hidden data.

savetopdf

public void savetopdf(java.lang.string filename)
saves specific worksheet to pdf.
parameters:
filename - file name.

savetopdfstream

public void savetopdfstream(java.io.outputstream outputstream)
saves specific worksheet to pdf stream.
parameters:
outputstream - stoutputstream.

tosvgstream

public void tosvgstream(java.io.outputstream outputstream,
                        int firstrow,
                        int firstcolumn,
                        int lastrow,
                        int lastcolumn)
saves specific cell ranges to svg stream
parameters:
outputstream - output stream.
firstrow - one-based index of the first row to convert.
firstcolumn - one-based index of the first column to convert.
lastrow - one-based index of the last row to convert.
lastcolumn - one-based index of the last column to convert.

setblank

public void setblank(int irow,
                     int icolumn)
sets blank in specified cell.
specified by:
setblank in interface iworksheet
parameters:
irow - one-based row index of the cell to set value.
icolumn - one-based column index of the cell to set value.

setboolean

public void setboolean(int irow,
                       int icolumn,
                       boolean value)
sets value in the specified cell.
specified by:
setboolean in interface iworksheet
parameters:
irow - one-based row index of the cell to set value.
icolumn - one-based column index of the cell to set value.
value - value to set.

setcolumnwidthinpixels

public void setcolumnwidthinpixels(int icolumn,
                                   int value)
sets column width in pixels.
specified by:
setcolumnwidthinpixels in interface iworksheet
parameters:
icolumn - one-based column index.
value - width in pixels to set.

setcolumnwidth

public void setcolumnwidth(int columnindex,
                           double width)
sets column width
parameters:
columnindex - column index.
width - width to set.

setcolumnwidthinpixels

public void setcolumnwidthinpixels(int columnindex,
                                   int count,
                                   int value)
sets the width of the specified columns.
parameters:
columnindex - column index
count - count
value - value

setdefaultcolumnstyle

public void setdefaultcolumnstyle(int columnindex,
                                  istyle defaultstyle)
sets default style for column.
specified by:
setdefaultcolumnstyle in interface iworksheet
parameters:
columnindex - column index.
defaultstyle - default style.

setdefaultcolumnstyle

public void setdefaultcolumnstyle(int firstcolumnindex,
                                  int lastcolumnindex,
                                  istyle defaultstyle)
sets by column index default style for column.
specified by:
setdefaultcolumnstyle in interface iworksheet
parameters:
firstcolumnindex - start column index.
lastcolumnindex - end column index.
defaultstyle - default style.

setdefaultrowstyle

public void setdefaultrowstyle(int rowindex,
                               istyle defaultstyle)
sets bdefault style for row.
specified by:
setdefaultrowstyle in interface iworksheet
parameters:
rowindex - row index.
defaultstyle - default style.

setdefaultrowstyle

public void setdefaultrowstyle(int firstrowindex,
                               int lastrowindex,
                               istyle defaultstyle)
sets by column index default style for row.
specified by:
setdefaultrowstyle in interface iworksheet
parameters:
firstrowindex - start row index.
lastrowindex - end row index.
defaultstyle - default style.

seterror

public void seterror(int irow,
                     int icolumn,
                     java.lang.string value,
                     boolean issettext)
parameters:
irow -
icolumn -
value -
issettext -

setformula

public void setformula(int irow,
                       int icolumn,
                       java.lang.string value)
sets formula in the specified cell.
specified by:
setformula in interface iworksheet
parameters:
irow - one-based row index of the cell to set value.
icolumn - one-based column index of the cell to set value.
value - formula to set.

setformula

public void setformula(int irow,
                       int icolumn,
                       java.lang.string value,
                       boolean bisr1c1)
sets formula in the specified cell.
parameters:
irow - one-based row index of the cell to set value.
icolumn - one-based column index of the cell to set value.
value - formula to set.
bisr1c1 - indicates is formula in r1c1 notation.

setformulaboolvalue

public void setformulaboolvalue(int irow,
                                int icolumn,
                                boolean value)
sets formula bool value.
specified by:
setformulaboolvalue in interface iworksheet
parameters:
irow - one based row index.
icolumn - one based column index.
value - represents formula bool value for set.

setformulaerrorvalue

public void setformulaerrorvalue(int irow,
                                 int icolumn,
                                 java.lang.string value)
sets formula error value.
specified by:
setformulaerrorvalue in interface iworksheet
parameters:
irow - one based row index.
icolumn - one based column index.
value - represents formula error value for set.

setformulanumbervalue

public void setformulanumbervalue(int irow,
                                  int icolumn,
                                  double value)
sets formula number value.
specified by:
setformulanumbervalue in interface iworksheet
parameters:
irow - one based row index.
icolumn - one based column index.
value - represents formula number value for set.

setformulastringvalue

public void setformulastringvalue(int irow,
                                  int icolumn,
                                  java.lang.string value)
sets formula string value.
specified by:
setformulastringvalue in interface iworksheet
parameters:
irow - one based row index.
icolumn - one based column index.
value - represents formula string value for set.

setnumber

public void setnumber(int irow,
                      int icolumn,
                      double value)
sets value in the specified cell.
specified by:
setnumber in interface iworksheet
parameters:
irow - one-based row index of the cell to set value.
icolumn - one-based column index of the cell to set value.
value - value to set.

setrowheightinpixels

public void setrowheightinpixels(int rowindex,
                                 int count,
                                 double value)
set row height from start row index
parameters:
rowindex - row index
count - count
value - value

setrowheight

public void setrowheight(int rowindex,
                         double height)
sets the height of the specified row.
parameters:
rowindex - row index.
height - height.

setrowheightpixels

public void setrowheightpixels(int rowindex,
                               double height)
sets the height of the specified row.
specified by:
setrowheightpixels in interface iworksheet
parameters:
rowindex - row index.
height - height.

settext

public void settext(int irow,
                    int icolumn,
                    java.lang.string value)
sets text in the specified cell.
specified by:
settext in interface iworksheet
parameters:
irow - one-based row index of the cell to set value.
icolumn - one-based column index of the cell to set value.
value - text to set.

setcellvalue

public void setcellvalue(int rowindex,
                         int columnindex,
                         boolean boolvalue)
sets value in the specified cell.
parameters:
rowindex - row index.
columnindex - column index.
boolvalue - value to set.

setcellvalue

public void setcellvalue(int rowindex,
                         int columnindex,
                         java.lang.string stringvalue)
sets value in the specified cell.
parameters:
rowindex - row index
columnindex - column index.
stringvalue - value to set.

groupbycolumns

public cellrange groupbycolumns(int firstcolumn,
                                int lastcolumn,
                                boolean iscollapsed)
groups columns.
parameters:
firstcolumn - the first column index to be grouped.
lastcolumn - the last column index to be grouped.
iscollapsed - indicates whether group should be collapsed.
returns:

groupbyrows

public cellrange groupbyrows(int firstrow,
                             int lastrow,
                             boolean iscollapsed)
groups rows.
parameters:
firstrow - the first row index to be grouped.
lastrow - the last row index to be grouped.
iscollapsed - indicates whether group should be collapsed.
returns:

ungroupbycolumns

public cellrange ungroupbycolumns(int firstcolumn,
                                  int lastcolumn)
ungroups columns.
parameters:
firstcolumn - the first column index to be grouped.
lastcolumn - the last column index to be grouped.
returns:

ungroupbyrows

public cellrange ungroupbyrows(int firstrow,
                               int lastrow)
ungroups rows.
parameters:
firstrow - the first row index to be grouped.
lastrow - the last row index to be grouped.
returns:


网站地图