jet.report.xls
Class GlobalWorksheet

java.lang.Object
  extended by jet.report.xls.Worksheet
      extended by jet.report.xls.GlobalWorksheet

public class GlobalWorksheet
extends Worksheet


Field Summary
 
Fields inherited from class jet.report.xls.Worksheet
X, Y
 
Constructor Summary
GlobalWorksheet(java.lang.String encoding)
           
GlobalWorksheet(java.lang.String encoding, boolean shareLabel)
          Constructs GlobalWorksheet Creates an empty GlobalWorksheet object with a blank Worksheet and all the empty fields.
 
Method Summary
 void addColor(int color)
          add a color to the palette
 void addIsstinf(Isstinf isstinf)
          add a Isstinf to the Extsst
 void addRecofFormula(int sheetNum)
           
 int addString(BUnicode addrgb, boolean use16bits)
          Add a string and assert the encoding (8-bit or 16-bit) to be used.
 int delString(java.lang.String string, boolean use16bits)
          delete a special string in Sst
 short getBackup()
          get the backup flag
 Backup getBackupRecord()
          get record Backup.
 short getCodePage()
          get the codepage for this workbook
 int getColorIndex(int color)
          get the index of the Color
 short getCurrentCountry()
          gets the current country
 short getDate()
          gets whether or not to use 1904 date windowing (which means you'll be screwed in 2004)
 short getDefaultCountry()
          gets the default country
 short getDsf()
          get the DSF flag
 Xf getExFormatAt(int index)
          gets the Xf at the given 0-based index
 short getFNGroupCount()
          get the number of built-in functions
 int getFontIndex(BFont font)
          get the index of the BFont
 short getFormatIndex(java.lang.String formatString, java.lang.String encoding)
          get format index that will be set in the Xf .
 boolean getFullPrecision()
          get whether to use full precision or not.
 short getHideObj()
          get hide object options
 int getNumExFormats()
          get the number of ExtendedFormat records contained in this workbook.
 short getPassword()
          get the password
 boolean getProt4REV()
          get whether the this is protected shared/tracked workbook or not
 boolean getProtect()
          get whether the sheet is protected or not
 short getProtPassword()
          get the password
 boolean getRefreshAll()
          get whether to refresh all external data when loading a sheet
 short getSaveLinkValues()
          get the save ext links flag
 boolean getShareLabel()
           
 java.lang.String getString(int j)
          Get a particular string in Sst by its index
 java.lang.String getUsername()
          get the username for the user that created the report.
 short getUseSelfFlag()
          returns whether we use natural language formulas or not
 boolean getWindowProtect()
          is this window protected or not
 int getXfIndex(Xf xf)
          get the index of the Xf
 void insertSST()
          use this function to add a Shared String Table to an existing sheet
 void makePalette()
          add the palette to the right location of the GlobalWorksheet if user modify the default color in the palette
 void setBackup(short ubackup)
          set the backup flag (0 for OFF, 1 for ON)
 void setCodePage(short code)
          set the codepage for this workbook
 void setCurrentCountry(short ccountry)
          sets the current country
 void setDate(short date)
          sets whether or not to use 1904 date windowing (which means you'll be screwed in 2004)
 void setDefaultCountry(short dcountry)
          sets the default country
 void setDsf(short fdsf)
          set the DSF flag
 void setFNGroupCount(short count)
          set the number of built-in functions
 void setFullPrecision(boolean fullprecision)
          set whether to use full precision or not.
 void setHideObj(short hideobj)
          set hide object options
 void setPassword(short password)
          set the password
 void setProt4REV(boolean b)
          set whether the this is protected shared/tracked workbook or not
 void setProtect(boolean bprotect)
          set whether the sheet is protected or not
 void setProtPassword(short password)
          set the encrypted password for shared-workbook
 void setRefreshAll(boolean refreshall)
          set whether to refresh all external data when loading a sheet
 void setSaveLinkValues(short value)
          set the save ext links flag
 void setShareLabel(boolean shareLabel)
           
 void setUsername(java.lang.String username)
          set the username for the user that created the report.
 void setUseSelfFlag(short flag)
          turn the flag on or off
 void setWindowProtect(boolean protect)
          set whether this window should be protected or not
 
Methods inherited from class jet.report.xls.Worksheet
addCell, addChart, addFormula, addHyperLink, addHyperLink, addLabel, addMergeRegion, addPicture, addPicture, addRow, addShapes, clearFreeze, converLabel, getCalcMode, getColumnWidth, getDefaultRowHeight, getDefaultRowHeightOptions, getDefColWidth, getFooter, getFrozen, getGridLine, getGridset, getHCenter, getHeader, getMaxChange, getMergeRegionAt, getNumMergeRegions, getPageBreak, getPrintGridlines, getPrintHeaders, getRecalc, getRefMode, getSheetName, getVCenter, getWSBool, isIteration, modifyMsoDrawing, removeMergeRegion, setCalcMode, setColumnWidth, setDefaultRowHeight, setDefaultRowHeightOptions, setDefColWidth, setFooter, setFreezePane, setGridLine, setGridset, setHCenter, setHeader, setIteration, setMaxChange, setPageBreak, setPrintGridlines, setPrintHeaders, setPrintLandscape, setRecalc, setRefMode, setRowHeight, setSheetName, setVCenter, setWSBool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalWorksheet

public GlobalWorksheet(java.lang.String encoding,
                       boolean shareLabel)
Constructs GlobalWorksheet Creates an empty GlobalWorksheet object with a blank Worksheet and all the empty fields. Use this to create a GlobalWorksheet from scratch.


GlobalWorksheet

public GlobalWorksheet(java.lang.String encoding)
Method Detail

getBackupRecord

public Backup getBackupRecord()
get record Backup.


getFormatIndex

public short getFormatIndex(java.lang.String formatString,
                            java.lang.String encoding)
get format index that will be set in the Xf .

Parameters:
format - the format string

getNumExFormats

public int getNumExFormats()
get the number of ExtendedFormat records contained in this workbook.

Returns:
int count of Xf

getExFormatAt

public Xf getExFormatAt(int index)
gets the Xf at the given 0-based index

Parameters:
index - of the Extended format record (0-based)
Returns:
Xf at the given index

getXfIndex

public int getXfIndex(Xf xf)
get the index of the Xf

Parameters:
xf - The Xf that the user want to get it index

getFontIndex

public int getFontIndex(BFont font)
get the index of the BFont

Parameters:
font - The BFont that the user want to get it index

getColorIndex

public int getColorIndex(int color)
get the index of the Color

Parameters:
color - The int value of the color that the user want to get it index

addColor

public void addColor(int color)
add a color to the palette

Parameters:
color - The int value of the color that the user want to add to the palette

makePalette

public void makePalette()
add the palette to the right location of the GlobalWorksheet if user modify the default color in the palette


insertSST

public void insertSST()
use this function to add a Shared String Table to an existing sheet


getProt4REV

public boolean getProt4REV()
get whether the this is protected shared/tracked workbook or not

Returns:
whether to protect the workbook or not

setProt4REV

public void setProt4REV(boolean b)
set whether the this is protected shared/tracked workbook or not

Parameters:
b - whether to protect the workbook or not

setCodePage

public void setCodePage(short code)
set the codepage for this workbook

Parameters:
code - - the codepage to set
See Also:
DEFCODEPAGE

getCodePage

public short getCodePage()
get the codepage for this workbook

Returns:
codepage - the codepage to set
See Also:
DEFCODEPAGE

setUsername

public void setUsername(java.lang.String username)
set the username for the user that created the report.

Parameters:
username - of the user who is logged in

getUsername

public java.lang.String getUsername()
get the username for the user that created the report. On natively created M$ Excel sheet this would be the name you typed in when you installed it in most cases.

Returns:
username of the user who is logged in

setDsf

public void setDsf(short fdsf)
set the DSF flag

Parameters:
dsfflag - (0-off,1-on)

getDsf

public short getDsf()
get the DSF flag

Returns:
dsfflag (0-off,1-on)

setFNGroupCount

public void setFNGroupCount(short count)
set the number of built-in functions

Parameters:
count - - number of functions

getFNGroupCount

public short getFNGroupCount()
get the number of built-in functions

Returns:
number of built-in functions

setWindowProtect

public void setWindowProtect(boolean protect)
set whether this window should be protected or not

Parameters:
protect - protect or not

getWindowProtect

public boolean getWindowProtect()
is this window protected or not

Returns:
protected or not

setProtect

public void setProtect(boolean bprotect)
set whether the sheet is protected or not

Parameters:
protect - whether to protect the sheet or not

getProtect

public boolean getProtect()
get whether the sheet is protected or not

Returns:
whether to protect the sheet or not

setPassword

public void setPassword(short password)
set the password

Parameters:
password - representing the password

getPassword

public short getPassword()
get the password

Returns:
short representing the password

setProtPassword

public void setProtPassword(short password)
set the encrypted password for shared-workbook

Parameters:
password - representing the password

getProtPassword

public short getProtPassword()
get the password

Returns:
short representing the encrypted password for shared-workbook

setBackup

public void setBackup(short ubackup)
set the backup flag (0 for OFF, 1 for ON)

Parameters:
backup - backup flag

getBackup

public short getBackup()
get the backup flag

Returns:
short 0/1 (off/on)

setHideObj

public void setHideObj(short hideobj)
set hide object options

Parameters:
hide - options HIDE_ALL = 2; SHOW_PLACEHOLDERS = 1; SHOW_ALL = 0

getHideObj

public short getHideObj()
get hide object options

Returns:
hide options

setDate

public void setDate(short date)
sets whether or not to use 1904 date windowing (which means you'll be screwed in 2004)

Parameters:
date - flag - 0/1 (false,true)

getDate

public short getDate()
gets whether or not to use 1904 date windowing (which means you'll be screwed in 2004)

Returns:
window flag - 0/1 (false,true)

setFullPrecision

public void setFullPrecision(boolean fullprecision)
set whether to use full precision or not.

Parameters:
fullprecision - - or not

getFullPrecision

public boolean getFullPrecision()
get whether to use full precision or not.

Returns:
fullprecision - or not

setRefreshAll

public void setRefreshAll(boolean refreshall)
set whether to refresh all external data when loading a sheet

Parameters:
refreshall - or not

getRefreshAll

public boolean getRefreshAll()
get whether to refresh all external data when loading a sheet

Returns:
refreshall or not

setSaveLinkValues

public void setSaveLinkValues(short value)
set the save ext links flag

Parameters:
value - flag (0/1 -off/on)

getSaveLinkValues

public short getSaveLinkValues()
get the save ext links flag

Returns:
short 0/1 (off/on)

setUseSelfFlag

public void setUseSelfFlag(short flag)
turn the flag on or off

Parameters:
flag - whether to use natural language formulas or not 1 for true; 0 for false

getUseSelfFlag

public short getUseSelfFlag()
returns whether we use natural language formulas or not

Returns:
whether to use natural language formulas or not 1 for true; 0 for false

setDefaultCountry

public void setDefaultCountry(short dcountry)
sets the default country

Parameters:
dcountry - ID to set (1 = US)

getDefaultCountry

public short getDefaultCountry()
gets the default country

Returns:
country ID (1 = US)

setCurrentCountry

public void setCurrentCountry(short ccountry)
sets the current country

Parameters:
ccountry - ID to set (1 = US)

getCurrentCountry

public short getCurrentCountry()
gets the current country

Returns:
country ID (1 = US)

getString

public java.lang.String getString(int j)
Get a particular string in Sst by its index

Parameters:
id - index into the strings in Sst
Returns:
the desired string

addString

public int addString(BUnicode addrgb,
                     boolean use16bits)
Add a string and assert the encoding (8-bit or 16-bit) to be used.

USE THIS METHOD AT YOUR OWN RISK. IF YOU FORCE 8-BIT ENCODING, YOU MAY CORRUPT YOUR STRING. IF YOU FORCE 16-BIT ENCODING AND IT ISN'T NECESSARY, YOU WILL WASTE SPACE WHEN THIS RECORD IS WRITTEN OUT.

Parameters:
addrgb - string to be added
useUTF16 - if true, forces 16-bit encoding. If false, forces 8-bit encoding
Returns:
the index of that string in the Sst

delString

public int delString(java.lang.String string,
                     boolean use16bits)
delete a special string in Sst

Parameters:
string - The string to be deleted
useUTF16 - if true, forces 16-bit encoding. If false, forces 8-bit encoding
Returns:
size of the Sst after deleted the string

addIsstinf

public void addIsstinf(Isstinf isstinf)
add a Isstinf to the Extsst

Parameters:
issrinf - The Isstinf to be added

addRecofFormula

public void addRecofFormula(int sheetNum)

setShareLabel

public void setShareLabel(boolean shareLabel)

getShareLabel

public boolean getShareLabel()