Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.report.xls
Class Worksheet

    java.lang.Object
      jet.report.xls.Worksheet

Direct Known Subclasses:
  GlobalWorksheet

    public class Worksheet

extends java.lang.Object

Field Summary
`static byte` | `X`
`static byte` | `Y`

Constructor Summary
`Worksheet(java.lang.String encoding)` Constructs Worksheet Creates an empty Worksheet object and all the empty fields.

Method Summary
`void` | `addCell(Blank cell)` add a cell to the Worksheet
`void` | `addChart(ChartInfo chartInfo, GlobalWorksheet gws, java.lang.String encoding)` add a chart to the Worksheet
`java.lang.StringBuffer` | `addFormula(Formula formula, GlobalWorksheet gws)` add a formula to the Worksheet
`void` | `addHyperLink(HLink link)` add a Label hyperlink object to this object.
`void` | `addHyperLink(HLink link, GlobalWorksheet gws, java.lang.String encoding, BFont font, boolean defFont)` add a HyperLink in the sheet
`void` | `addLabel(BLabel cell, GlobalWorksheet gws)` add a Label record to the Worksheet
`int` | `addMergeRegion(Region region)` add a merged region
`void` | `addPicture(GlobalWorksheet gws, java.lang.String path, ImgInfo imgInfo)` add a picture to the Worksheet
`void` | `addPicture(GlobalWorksheet gws, java.lang.String path, ImgInfo imgInfo, HLink link)` add a picture with hyperlink to the Worksheet
`void` | `addRow(Row row)` add a new row in the Worksheet
`void` | `addShapes(GlobalWorksheet gws, ShapesInfo shapesInfo)` add a shape to the Worksheet
`void` | `clearFreeze()` unfreeze panes
`void` | `converLabel()` conver the Label record to LabelSST record in the Worksheet for share label in the whole worksheet
`short` | `getCalcMode()` get the calculation mode
`short` | `getColumnWidth(short column)` get the width of a given column in units of 1/20th of a point width (twips?)
`short` | `getDefaultRowHeight()` get default row height
`short` | `getDefaultRowHeightOptions()` get default row height option
`short` | `getDefColWidth()` get default width of the column
`java.lang.String` | `getFooter()` get print footer string
`short[]` | `getFrozen()` get the freeze postion, if the worksheet is unfreeze the return value will null can get the coordinate x value throught ret[Worksheet.X] and y value through ret[Worksheet.Y] if the ret is not null.
`boolean` | `getGridLine()` get whether the window should display gridlines
`boolean` | `getGridset()` get whether the user has ever changed the setting of the Gridlines option
`boolean` | `getHCenter()` get whether the sheet is to be centered between horizonal margins when printed
`java.lang.String` | `getHeader()` get print header string
`double` | `getMaxChange()` get the Maximum iteration change
`Region` | `getMergeRegionAt(int index)` get a special merged region
`int` | `getNumMergeRegions()` get the count of all merged regions
`boolean` | `getPageBreak()` get whether window display page break option
`boolean` | `getPrintGridlines()` get whether to print gridlines
`boolean` | `getPrintHeaders()` get whether to print row and column heading
`boolean` | `getRecalc()` get whether to recalculate before saving
`short` | `getRefMode()` get the Reference mode
`java.lang.String` | `getSheetName()` get the Worksheet name.
`boolean` | `getVCenter()` get whether the sheet is to be centered between vertical margins when printed
`short` | `getWSBool()` get WSBool option flag
`boolean` | `isIteration()` get the Iteration option
`void` | `modifyMsoDrawing(int increase)` modify MsoDrawing record
`void` | `removeMergeRegion(int index)` remove a merged region
`void` | `setCalcMode(short mode)` set the calculation mode
`void` | `setColumnWidth(short column, short width)` set the width for a given column in 1/20th of a character width units if the default column width is not 8, the method is unuseful.
`void` | `setDefaultRowHeight(short rowheight)` set default row height
`void` | `setDefaultRowHeightOptions(short flags)` set default row height option
`void` | `setDefColWidth(short colwidth)` set default width of the column
`void` | `setFooter(java.lang.String printPageFooter)` set print footer string and the length of the footer string
`void` | `setFreezePane(short x, short y)` set the freeze Panes
`void` | `setGridLine(boolean bool)` set whether the window should display gridlines
`void` | `setGridset(boolean bool)` set whether the user has ever changed the setting of the Gridlines option
`void` | `setHCenter(boolean center)` set whether the sheet is to be centered between horizonal margins when printed
`void` | `setHeader(java.lang.String printPageHeader)` set print header string and the length of the header string
`void` | `setIteration(boolean bool)` set the Iteration option
`void` | `setMaxChange(double change)` set the Maximum iteration change
`void` | `setPageBreak(boolean bool)` set whether window display page break option
`void` | `setPrintGridlines(boolean print)` set whether to print gridlines
`void` | `setPrintHeaders(boolean print)` set whether to print row and column heading
`void` | `setPrintLandscape(boolean isLandscape)` according the flag to set the Print Landscape
`void` | `setRecalc(boolean recalc)` set whether to recalculate before saving
`void` | `setRefMode(short mode)` set the Reference mode
`void` | `setRowHeight(int rowNum, short height)` set the heigth of special row
`void` | `setSheetName(java.lang.String sheetname)` set the Worksheet name
`void` | `setVCenter(boolean center)` set whether the sheet is to be centered between vertical margins when printed
`void` | `setWSBool(short flag)` set WSBool option flag

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### X

    public static final byte X

See Also:
  Constant Field Values

### Y

    public static final byte Y

See Also:
  Constant Field Values

Constructor Detail

### Worksheet

    public Worksheet(java.lang.String encoding)

  Constructs Worksheet Creates an empty Worksheet object and all the empty fields. Use this to create a Worksheet from scratch.

Method Detail

### setSheetName

    public void setSheetName(java.lang.String sheetname)

  set the Worksheet name

  Parameters:
    `sheetname` - The name of Worksheet.

### setPrintLandscape

    public void setPrintLandscape(boolean isLandscape)

  according the flag to set the Print Landscape

  Parameters:
    `isLandscape` -

### setFreezePane

    public void setFreezePane(short x,
                              short y)

  set the freeze Panes

  Parameters:
    `x` -
    `y` -
    `format` -

### clearFreeze

    public void clearFreeze()

  unfreeze panes

### getFrozen

    public short[] getFrozen()

  get the freeze postion, if the worksheet is unfreeze the return value will null can get the coordinate x value throught ret[Worksheet.X] and y value through ret[Worksheet.Y] if the ret is not null.

  Returns:
    shrot[] ret

### getSheetName

    public java.lang.String getSheetName()

  get the Worksheet name.

### addRow

    public void addRow(Row row)

  add a new row in the Worksheet

  Parameters:
    `row` - The Row to be added.

### addLabel

    public void addLabel(BLabel cell,
                         GlobalWorksheet gws)

  add a Label record to the Worksheet

  Parameters:
    `cell` - The Label to be addded
    `gws` - The GloabalWorksheet to be added Sst in it.

### addHyperLink

    public void addHyperLink(HLink link)

  add a Label hyperlink object to this object. We did not add a lable to this position

  Parameters:
    `link` -

### addHyperLink

    public void addHyperLink(HLink link,
                             GlobalWorksheet gws,
                             java.lang.String encoding,
                             BFont font,
                             boolean defFont)

  add a HyperLink in the sheet

  Parameters:
    `link` - The HyperLink to be addded
    `gws` - The GloabalWorksheet of the workbook.
    `defFont` - Whether use the default font of the HyperLink to the cell which be added HyperLink

### converLabel

    public void converLabel()

  conver the Label record to LabelSST record in the Worksheet for share label in the whole worksheet

### addCell

    public void addCell(Blank cell)

  add a cell to the Worksheet

  Parameters:
    `cell` - The cell to be addded, the cell can be BNumber or BoolErr

### addFormula

    public java.lang.StringBuffer addFormula(Formula formula,
                                             GlobalWorksheet gws)
                                      throws java.io.IOException

  add a formula to the Worksheet

  Parameters:
    `formula` - The formula to be addded.
  Throws:
    `java.io.IOException`

### modifyMsoDrawing

    public void modifyMsoDrawing(int increase)

  modify MsoDrawing record

### addPicture

    public void addPicture(GlobalWorksheet gws,
                           java.lang.String path,
                           ImgInfo imgInfo)

  add a picture to the Worksheet

  Parameters:
    `path` - The path of picture to be addded.

### addPicture

    public void addPicture(GlobalWorksheet gws,
                           java.lang.String path,
                           ImgInfo imgInfo,
                           HLink link)

  add a picture with hyperlink to the Worksheet

  Parameters:
    `path` - The path of picture to be addded.

### addShapes

    public void addShapes(GlobalWorksheet gws,
                          ShapesInfo shapesInfo)

  add a shape to the Worksheet

  Parameters:
    `type` - The type of shapes to be addded.

### addChart

    public void addChart(ChartInfo chartInfo,
                         GlobalWorksheet gws,
                         java.lang.String encoding)
                  throws java.io.IOException

  add a chart to the Worksheet

  Parameters:
    `chartInfo` - The information of the chart to be addded.
  Throws:
    `java.io.IOException`

### setCalcMode

    public void setCalcMode(short mode)

  set the calculation mode

  Parameters:
    `mode` - The calculation mode. 0 for manual; 1 for automatic; -1 for automatic, except tables

### getCalcMode

    public short getCalcMode()

  get the calculation mode

  Returns:
    The calculation mode. 0 for manual; 1 for automatic; -1 for automatic, except tables

### setRefMode

    public void setRefMode(short mode)

  set the Reference mode

  Parameters:
    `mode` - The Reference mode. 0 for R1C1 mode; 1 for A1 mode.

### getRefMode

    public short getRefMode()

  get the Reference mode

  Returns:
    The Reference mode. 0 for R1C1 mode; 1 for A1 mode.

### setIteration

    public void setIteration(boolean bool)

  set the Iteration option

  Parameters:
    `bool` - Whether Iteration option is on or not. 0 : off; 1 : on.

### isIteration

    public boolean isIteration()

  get the Iteration option

  Returns:
    Whether Iteration option is on or not. 0 : off; 1 : on.

### setMaxChange

    public void setMaxChange(double change)

  set the Maximum iteration change

  Parameters:
    `change` - The maximum iteration change

### getMaxChange

    public double getMaxChange()

  get the Maximum iteration change

  Returns:
    The maximum iteration change

### setRecalc

    public void setRecalc(boolean recalc)

  set whether to recalculate before saving

  Parameters:
    `recalc` - whether to recalculate before saving or not

### getRecalc

    public boolean getRecalc()

  get whether to recalculate before saving

  Returns:
    whether to recalculate before saving or not

### setPrintHeaders

    public void setPrintHeaders(boolean print)

  set whether to print row and column heading

  Parameters:
    `print` - whether to print row and column heading or not

### getPrintHeaders

    public boolean getPrintHeaders()

  get whether to print row and column heading

  Returns:
    whether to print row and column heading or not

### setPrintGridlines

    public void setPrintGridlines(boolean print)

  set whether to print gridlines

  Parameters:
    `print` - whether to print gridlines or not

### getPrintGridlines

    public boolean getPrintGridlines()

  get whether to print gridlines

  Returns:
    whether to print gridlines or not

### setGridset

    public void setGridset(boolean bool)

  set whether the user has ever changed the setting of the Gridlines option

  Parameters:
    `bool` - whether has changed or not

### getGridset

    public boolean getGridset()

  get whether the user has ever changed the setting of the Gridlines option

  Returns:
    whether has changed or not

### setPageBreak

    public void setPageBreak(boolean bool)

  set whether window display page break option

  Parameters:
    `bool` - whether window display page break or not

### getPageBreak

    public boolean getPageBreak()

  get whether window display page break option

  Returns:
    whether window display page break option or not

### setGridLine

    public void setGridLine(boolean bool)

  set whether the window should display gridlines

  Parameters:
    `bool` - whether the window should display gridlines

### getGridLine

    public boolean getGridLine()

  get whether the window should display gridlines

  Returns:
    whether the window should display gridlines or not

### setDefaultRowHeight

    public void setDefaultRowHeight(short rowheight)

  set default row height

  Parameters:
    `rowheight` - The default row height

### getDefaultRowHeight

    public short getDefaultRowHeight()

  get default row height

  Returns:
    The default row height

### setDefaultRowHeightOptions

    public void setDefaultRowHeightOptions(short flags)

  set default row height option

  Parameters:
    `flags` - The default row height option the value of the flags is INCOMPATIBLE, ZERO, EXASC or EXDSC in class DefRowHeight or combine this value

### getDefaultRowHeightOptions

    public short getDefaultRowHeightOptions()

  get default row height option

  Returns:
    The default row height option the value of rerurn is INCOMPATIBLE, ZERO, EXASC or EXDSC in class DefRowHeight or combine this value

### setWSBool

    public void setWSBool(short flag)

  set WSBool option flag

  Parameters:
    `flag` - The WSBool option flag the value of the flags is SHOWAUTOBREAKS, DIALOG, APPLYSTYLES, RWSUMSBELOW, COLSUMSRIGHT, FITTOPAGE, DSPGUTS, AEE, AFE in class WSBool or combine of them

### getWSBool

    public short getWSBool()

  get WSBool option flag

  Returns:
    The WSBool option flag the return value this method is SHOWAUTOBREAKS, DIALOG, APPLYSTYLES, RWSUMSBELOW, COLSUMSRIGHT, FITTOPAGE, DSPGUTS, AEE, AFE in class WSBool or combine of them

### setHeader

    public void setHeader(java.lang.String printPageHeader)

  set print header string and the length of the header string

  Parameters:
    `str` - The header string

### getHeader

    public java.lang.String getHeader()

  get print header string

  Returns:
    The header string

### setFooter

    public void setFooter(java.lang.String printPageFooter)

  set print footer string and the length of the footer string

  Parameters:
    `printPageFooter` - The footer string

### getFooter

    public java.lang.String getFooter()

  get print footer string

  Returns:
    The footer string

### setHCenter

    public void setHCenter(boolean center)

  set whether the sheet is to be centered between horizonal margins when printed

  Parameters:
    `center` - whether the sheet is to be centered between horizonal margins when printed

### getHCenter

    public boolean getHCenter()

  get whether the sheet is to be centered between horizonal margins when printed

  Returns:
    whether the sheet is to be centered between horizonal margins when printed

### setVCenter

    public void setVCenter(boolean center)

  set whether the sheet is to be centered between vertical margins when printed

  Parameters:
    `center` - whether the sheet is to be centered between vertical margins when printed

### getVCenter

    public boolean getVCenter()

  get whether the sheet is to be centered between vertical margins when printed

  Returns:
    whether the sheet is to be centered between vertical margins when printed

### setDefColWidth

    public void setDefColWidth(short colwidth)

  set default width of the column

  Parameters:
    `colwidth` - The default width of the column

### getDefColWidth

    public short getDefColWidth()

  get default width of the column

  Returns:
    The default width of the column

### getColumnWidth

    public short getColumnWidth(short column)

  get the width of a given column in units of 1/20th of a point width (twips?)

  Returns:
    column width in units of 1/20th of a point (twips?)

### setColumnWidth

    public void setColumnWidth(short column,
                               short width)

  set the width for a given column in 1/20th of a character width units if the default column width is not 8, the method is unuseful. so if you want set the column width, you must insure getDefColWidth() is 8.

  Parameters:
    `column` - - the column number
    `width` - (in units of 1/20th of a character width)

### addMergeRegion

    public int addMergeRegion(Region region)

  add a merged region

  Parameters:
    `region` - The merged region

### removeMergeRegion

    public void removeMergeRegion(int index)

  remove a merged region

  Parameters:
    `index` - The index of merged region to be removed

### getMergeRegionAt

    public Region getMergeRegionAt(int index)

  get a special merged region

  Parameters:
    `index` - The index of merged region to be gotten

### getNumMergeRegions

    public int getNumMergeRegions()

  get the count of all merged regions

  Returns:
    the count of all merged regions

### setRowHeight

    public void setRowHeight(int rowNum,
                             short height)

  set the heigth of special row

  Parameters:
    `rowNum` - the row number to set
    `the` - row height to set

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD