Java Doc for Workbook.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » hssf » model » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Collaboration » poi 3.0.2 beta2 » org.apache.poi.hssf.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.poi.hssf.model.Workbook

Workbook
public class Workbook implements Model(Code)
Low level model implementation of a Workbook. Provides creational methods for settings and objects contained in the workbook object.

This file contains the low level binary records starting at the workbook's BOF and ending with the workbook's EOF. Use HSSFWorkbook for a high level representation.

The structures of the highlevel API use references to this to perform most of their operations. Its probably unwise to use these low level structures directly unless you really know what you're doing. I recommend you read the Microsoft Excel 97 Developer's Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf before even attempting to use this.
author:
   Luc Girardin (luc dot girardin at macrofocus dot com)
author:
   Sergei Kozello (sergeikozello at mail.ru)
author:
   Shawn Laubach (slaubach at apache dot org) (Data Formats)
author:
   Andrew C. Oliver (acoliver at apache dot org)
author:
   Brian Sanders (bsanders at risklabs dot com) - custom palette
author:
   Dan Sherman (dsherman at isisph.com)
author:
   Glen Stampoultzis (glens at apache.org)
See Also:   org.apache.poi.hssf.usermodel.HSSFWorkbook
version:
   1.0-pre



Field Summary
protected  ArrayListboundsheets
    
protected  ExternSheetRecordexternSheet
    
protected  ArrayListformats
    
protected  ArrayListnames
    
protected  intnumfonts
    
protected  intnumxfs
    
protected  WorkbookRecordListrecords
    
protected  SSTRecordsst
     this contains a reference to the SSTRecord so that new stings can be added to it.

Constructor Summary
public  Workbook()
    

Method Summary
public  intaddBSERecord(EscherBSERecord e)
    
public  NameRecordaddName(NameRecord name)
    
public  intaddSSTString(UnicodeString string)
    
public  shortcheckExternSheet(int sheetNumber)
    
protected  RecordcreateBOF()
    
protected  RecordcreateBackup()
     creates the Backup record with backup set to 0.
protected  RecordcreateBookBool()
     creates the BookBool record with saveLinkValues set to 0.
protected  RecordcreateBoundSheet(int id)
     create a "bound sheet" or "bundlesheet" (depending who you ask) record Always sets the sheet's bof to 0.
public  NameRecordcreateBuiltInName(byte builtInName, int index)
    
public  ExtendedFormatRecordcreateCellXF()
    
protected  RecordcreateCodepage()
    
protected  RecordcreateCountry()
    
protected  RecordcreateDSF()
    
protected  RecordcreateDateWindow1904()
     creates the DateWindow1904 record with windowing set to 0.
public  voidcreateDrawingGroup()
     Creates a drawing group record.
protected  RecordcreateEOF()
    
protected  RecordcreateExtendedFormat(int id)
    
protected  ExtendedFormatRecordcreateExtendedFormat()
     creates an default cell type ExtendedFormatRecord object.
protected  RecordcreateExtendedSST()
     Creates the ExtendedSST record with numstrings per bucket set to 0x8.
protected  ExternSheetRecordcreateExternSheet()
    
protected  RecordcreateFnGroupCount()
     creates the FnGroupCount record containing the Magic number constant of 14.
protected  RecordcreateFont()
    
protected  RecordcreateFormat(int id)
    
public  shortcreateFormat(String format)
     Creates a FormatRecord, inserts it, and returns the index code.
protected  RecordcreateHideObj()
     creates the HideObj record with hide object set to 0.
protected  RecordcreateInterfaceEnd()
    
protected  RecordcreateInterfaceHdr()
    
protected  RecordcreateMMS()
    
public  NameRecordcreateName()
    
public  FontRecordcreateNewFont()
     creates a new font record and adds it to the "font table".
protected  PaletteRecordcreatePalette()
    
protected  RecordcreatePassword()
     creates the Password record with password set to 0.
protected  RecordcreatePasswordRev4()
     creates the PasswordRev4 record with password set to 0.
protected  RecordcreatePrecision()
     creates the Precision record with precision set to true.
protected  RecordcreateProtect()
     creates the Protect record with protect set to false.
protected  RecordcreateProtectionRev4()
     creates the ProtectionRev4 record with protect set to false.
protected  RecordcreateRefreshAll()
     creates the RefreshAll record with refreshAll set to true.
protected  RecordcreateSST()
    
protected  RecordcreateStyle(int id)
     Creates a StyleRecord object
Parameters:
  id - the number of the style record to create (meaning its position ina file as MS Excel would create it.
protected  RecordcreateTabId()
     creates the TabId record containing an array of 0,1,2.
protected  RecordcreateUseSelFS()
    
protected  RecordcreateWindowOne()
    
protected  RecordcreateWindowProtect()
     creates the WindowProtect record with protect set to false.
public static  WorkbookcreateWorkbook(List recs)
     read support for low level API.
public static  WorkbookcreateWorkbook()
     Creates an empty workbook object with three blank sheets and all the empty fields.
protected  RecordcreateWriteAccess()
    
public  booleandoesContainsSheetName(String name, int excludeSheetIdx)
     Determines whether a workbook contains the privided sheet name.
Parameters:
  name - the name to test
Parameters:
  excludeSheetIdx - the sheet to exclude from the check or -1 to include all sheets in the check.
public  RecordfindFirstRecordBySid(short sid)
     Returns the first occurance of a record matching a particular sid.
public  intfindFirstRecordLocBySid(short sid)
     Returns the index of a record matching a particular sid.
public  RecordfindNextRecordBySid(short sid, int pos)
     Returns the next occurance of a record matching a particular sid.
public  StringfindSheetNameFromExternSheet(short num)
    
public  EscherBSERecordgetBSERecord(int pictureIndex)
    
public  BackupRecordgetBackupRecord()
     Returns the position of the backup record.
public  PaletteRecordgetCustomPalette()
     Returns the custom palette in use for this workbook; if a custom palette record does not exist, then it is created.
public  DrawingManager2getDrawingManager()
    
public  ExtendedFormatRecordgetExFormatAt(int index)
    
public  FileSharingRecordgetFileSharing()
    
public  FontRecordgetFontRecordAt(int idx)
     gets the font record at the given index in the font table.
public  shortgetFormat(String format, boolean createIfNotFound)
     Returns a format index that matches the passed in format.
public  ArrayListgetFormats()
     Returns the list of FormatRecords in the workbook.
public  NameRecordgetNameRecord(int index)
    
public  intgetNumExFormats()
     get the number of ExtendedFormat records contained in this workbook.
public  intgetNumNames()
    
public  intgetNumRecords()
    
public  intgetNumSheets()
     returns the number of boundsheet objects contained in this workbook.
public  intgetNumberOfFontRecords()
    
public  ListgetRecords()
    
public  UnicodeStringgetSSTString(int str)
    
public  intgetSheetIndex(String name)
    
public  intgetSheetIndexFromExternSheetIndex(int externSheetNumber)
     Finds the sheet index for a particular external sheet number.
public  StringgetSheetName(int sheetnum)
     gets the name for a given sheet.
public  SheetReferencesgetSheetReferences()
    
public  intgetSize()
    
public  NameRecordgetSpecificBuiltinRecord(byte name, int sheetIndex)
    
public  WindowOneRecordgetWindowOne()
    
public  WriteAccessRecordgetWriteAccess()
    
public  WriteProtectRecordgetWriteProtect()
    
public  voidinsertSST()
     use this function to add a Shared String Table to an existing sheet (say generated by a different java api) without an sst....
public  booleanisUsing1904DateWindowing()
     Whether date windowing is based on 1/2/1904 or 1/1/1900.
public  voidremoveBuiltinRecord(byte name, int sheetIndex)
    
public  voidremoveName(int namenum)
    
public  voidremoveSheet(int sheetnum)
    
public  intserialize(int offset, byte[] data)
     Serializes all records int the worksheet section into a big byte array.
public  voidsetSheetBof(int sheetnum, int pos)
    
public  voidsetSheetName(int sheetnum, String sheetname)
     sets the name for a given sheet.
public  voidsetSheetName(int sheetnum, String sheetname, short encoding)
     sets the name for a given sheet forcing the encoding.
public  voidsetSheetOrder(String sheetname, int pos)
     sets the order of appearance for a given sheet.
public  voidunwriteProtectWorkbook()
    
public  voidwriteProtectWorkbook(String password, String username)
     protect a workbook with a password (not encypted, just sets writeprotect flags and the password.

Field Detail
boundsheets
protected ArrayList boundsheets(Code)
holds the "boundsheet" records (aka bundlesheet) so that they can have their reference to their "BOF" marker



externSheet
protected ExternSheetRecord externSheet(Code)
Holds the Extern Sheet with references to bound sheets



formats
protected ArrayList formats(Code)



names
protected ArrayList names(Code)



numfonts
protected int numfonts(Code)



numxfs
protected int numxfs(Code)



records
protected WorkbookRecordList records(Code)
this contains the Worksheet record objects



sst
protected SSTRecord sst(Code)
this contains a reference to the SSTRecord so that new stings can be added to it.




Constructor Detail
Workbook
public Workbook()(Code)
Creates new Workbook with no intitialization --useless right now
See Also:   Workbook.createWorkbook(List)




Method Detail
addBSERecord
public int addBSERecord(EscherBSERecord e)(Code)



addName
public NameRecord addName(NameRecord name)(Code)
creates new name new name record



addSSTString
public int addSSTString(UnicodeString string)(Code)
Adds a string to the SST table and returns its index (if its a duplicate just returns its index and update the counts) ASSUMES compressed unicode (meaning 8bit)
Parameters:
  string - the string to be added to the SSTRecord index of the string within the SSTRecord



checkExternSheet
public short checkExternSheet(int sheetNumber)(Code)
returns the extern sheet number for specific sheet number , if this sheet doesn't exist in extern sheet , add it
Parameters:
  sheetNumber - sheet number index to extern sheet



createBOF
protected Record createBOF()(Code)
creates the BOF record
See Also:   org.apache.poi.hssf.record.BOFRecord
See Also:   org.apache.poi.hssf.record.Record record containing a BOFRecord



createBackup
protected Record createBackup()(Code)
creates the Backup record with backup set to 0. (loose the data, who cares)
See Also:   org.apache.poi.hssf.record.BackupRecord
See Also:   org.apache.poi.hssf.record.Record record containing a BackupRecord



createBookBool
protected Record createBookBool()(Code)
creates the BookBool record with saveLinkValues set to 0. (don't save link values)
See Also:   org.apache.poi.hssf.record.BookBoolRecord
See Also:   org.apache.poi.hssf.record.Record record containing a BookBoolRecord



createBoundSheet
protected Record createBoundSheet(int id)(Code)
create a "bound sheet" or "bundlesheet" (depending who you ask) record Always sets the sheet's bof to 0. You'll need to set that yourself.
Parameters:
  id - either sheet 0,1 or 2. record containing a BoundSheetRecord
See Also:   org.apache.poi.hssf.record.BoundSheetRecord
See Also:   org.apache.poi.hssf.record.Record



createBuiltInName
public NameRecord createBuiltInName(byte builtInName, int index)(Code)
Generates a NameRecord to represent a built-in region a new NameRecord unless the index is invalid



createCellXF
public ExtendedFormatRecord createCellXF()(Code)
creates a new Cell-type Extneded Format Record and adds it to the end of ExtendedFormatRecords collection ExtendedFormatRecord that was created



createCodepage
protected Record createCodepage()(Code)
creates the Codepage record containing the constant stored in CODEPAGE
See Also:   org.apache.poi.hssf.record.CodepageRecord
See Also:   org.apache.poi.hssf.record.Record record containing a CodepageRecord



createCountry
protected Record createCountry()(Code)
Creates the Country record with the default country set to 1 and current country set to 7 in case of russian locale ("ru_RU") and 1 otherwise record containing a CountryRecord
See Also:   org.apache.poi.hssf.record.CountryRecord
See Also:   org.apache.poi.hssf.record.Record



createDSF
protected Record createDSF()(Code)
creates the DSF record containing a 0 since HSSF can't even create Dual Stream Files
See Also:   org.apache.poi.hssf.record.DSFRecord
See Also:   org.apache.poi.hssf.record.Record record containing a DSFRecord



createDateWindow1904
protected Record createDateWindow1904()(Code)
creates the DateWindow1904 record with windowing set to 0. (don't window)
See Also:   org.apache.poi.hssf.record.DateWindow1904Record
See Also:   org.apache.poi.hssf.record.Record record containing a DateWindow1904Record



createDrawingGroup
public void createDrawingGroup()(Code)
Creates a drawing group record. If it already exists then it's modified.



createEOF
protected Record createEOF()(Code)
creates the EOF record
See Also:   org.apache.poi.hssf.record.EOFRecord
See Also:   org.apache.poi.hssf.record.Record record containing a EOFRecord



createExtendedFormat
protected Record createExtendedFormat(int id)(Code)
Creates an ExtendedFormatRecord object
Parameters:
  id - the number of the extended format record to create (meaning its position ina file as MS Excel would create it.) record containing an ExtendedFormatRecord
See Also:   org.apache.poi.hssf.record.ExtendedFormatRecord
See Also:   org.apache.poi.hssf.record.Record



createExtendedFormat
protected ExtendedFormatRecord createExtendedFormat()(Code)
creates an default cell type ExtendedFormatRecord object. ExtendedFormatRecord with intial defaults (cell-type)



createExtendedSST
protected Record createExtendedSST()(Code)
Creates the ExtendedSST record with numstrings per bucket set to 0x8. HSSF doesn't yet know what to do with this thing, but we create it with nothing in it hardly just to make Excel happy and our sheets look like Excel's record containing an ExtSSTRecord
See Also:   org.apache.poi.hssf.record.ExtSSTRecord
See Also:   org.apache.poi.hssf.record.Record



createExternSheet
protected ExternSheetRecord createExternSheet()(Code)
creates a new extern sheet record the new extern sheet record



createFnGroupCount
protected Record createFnGroupCount()(Code)
creates the FnGroupCount record containing the Magic number constant of 14.
See Also:   org.apache.poi.hssf.record.FnGroupCountRecord
See Also:   org.apache.poi.hssf.record.Record record containing a FnGroupCountRecord



createFont
protected Record createFont()(Code)
creates a Font record with the following magic values:

fontheight = 0xc8

attributes = 0x0

color palette index = 0x7fff

bold weight = 0x190

Font Name Length = 5

Font Name = Arial


See Also:   org.apache.poi.hssf.record.FontRecord
See Also:   org.apache.poi.hssf.record.Record record containing a FontRecord




createFormat
protected Record createFormat(int id)(Code)
Creates a FormatRecord object
Parameters:
  id - the number of the format record to create (meaning its position ina file as M$ Excel would create it.) record containing a FormatRecord
See Also:   org.apache.poi.hssf.record.FormatRecord
See Also:   org.apache.poi.hssf.record.Record



createFormat
public short createFormat(String format)(Code)
Creates a FormatRecord, inserts it, and returns the index code.
Parameters:
  format - the format string the index code of the format record.
See Also:   org.apache.poi.hssf.record.FormatRecord
See Also:   org.apache.poi.hssf.record.Record



createHideObj
protected Record createHideObj()(Code)
creates the HideObj record with hide object set to 0. (don't hide)
See Also:   org.apache.poi.hssf.record.HideObjRecord
See Also:   org.apache.poi.hssf.record.Record record containing a HideObjRecord



createInterfaceEnd
protected Record createInterfaceEnd()(Code)
creates the InterfaceEnd record
See Also:   org.apache.poi.hssf.record.InterfaceEndRecord
See Also:   org.apache.poi.hssf.record.Record record containing a InterfaceEndRecord



createInterfaceHdr
protected Record createInterfaceHdr()(Code)
creates the InterfaceHdr record
See Also:   org.apache.poi.hssf.record.InterfaceHdrRecord
See Also:   org.apache.poi.hssf.record.Record record containing a InterfaceHdrRecord



createMMS
protected Record createMMS()(Code)
creates an MMS record
See Also:   org.apache.poi.hssf.record.MMSRecord
See Also:   org.apache.poi.hssf.record.Record record containing a MMSRecord



createName
public NameRecord createName()(Code)
creates new name new name record



createNewFont
public FontRecord createNewFont()(Code)
creates a new font record and adds it to the "font table". This causes the boundsheets to move down one, extended formats to move down (so this function moves those pointers as well) FontRecord that was just created



createPalette
protected PaletteRecord createPalette()(Code)
Creates a palette record initialized to the default palette a PaletteRecord instance populated with the default colors
See Also:   org.apache.poi.hssf.record.PaletteRecord



createPassword
protected Record createPassword()(Code)
creates the Password record with password set to 0.
See Also:   org.apache.poi.hssf.record.PasswordRecord
See Also:   org.apache.poi.hssf.record.Record record containing a PasswordRecord



createPasswordRev4
protected Record createPasswordRev4()(Code)
creates the PasswordRev4 record with password set to 0.
See Also:   org.apache.poi.hssf.record.PasswordRev4Record
See Also:   org.apache.poi.hssf.record.Record record containing a PasswordRev4Record



createPrecision
protected Record createPrecision()(Code)
creates the Precision record with precision set to true. (full precision)
See Also:   org.apache.poi.hssf.record.PrecisionRecord
See Also:   org.apache.poi.hssf.record.Record record containing a PrecisionRecord



createProtect
protected Record createProtect()(Code)
creates the Protect record with protect set to false.
See Also:   org.apache.poi.hssf.record.ProtectRecord
See Also:   org.apache.poi.hssf.record.Record record containing a ProtectRecord



createProtectionRev4
protected Record createProtectionRev4()(Code)
creates the ProtectionRev4 record with protect set to false.
See Also:   org.apache.poi.hssf.record.ProtectionRev4Record
See Also:   org.apache.poi.hssf.record.Record record containing a ProtectionRev4Record



createRefreshAll
protected Record createRefreshAll()(Code)
creates the RefreshAll record with refreshAll set to true. (refresh all calcs)
See Also:   org.apache.poi.hssf.record.RefreshAllRecord
See Also:   org.apache.poi.hssf.record.Record record containing a RefreshAllRecord



createSST
protected Record createSST()(Code)
Creates the SST record with no strings and the unique/num string set to 0 record containing a SSTRecord
See Also:   org.apache.poi.hssf.record.SSTRecord
See Also:   org.apache.poi.hssf.record.Record



createStyle
protected Record createStyle(int id)(Code)
Creates a StyleRecord object
Parameters:
  id - the number of the style record to create (meaning its position ina file as MS Excel would create it. record containing a StyleRecord
See Also:   org.apache.poi.hssf.record.StyleRecord
See Also:   org.apache.poi.hssf.record.Record



createTabId
protected Record createTabId()(Code)
creates the TabId record containing an array of 0,1,2. This release of HSSF always has the default three sheets, no less, no more.
See Also:   org.apache.poi.hssf.record.TabIdRecord
See Also:   org.apache.poi.hssf.record.Record record containing a TabIdRecord



createUseSelFS
protected Record createUseSelFS()(Code)
Creates the UseSelFS object with the use natural language flag set to 0 (false) record containing a UseSelFSRecord
See Also:   org.apache.poi.hssf.record.UseSelFSRecord
See Also:   org.apache.poi.hssf.record.Record



createWindowOne
protected Record createWindowOne()(Code)
creates the WindowOne record with the following magic values:

horizontal hold - 0x168

vertical hold - 0x10e

width - 0x3a5c

height - 0x23be

options - 0x38

selected tab - 0

displayed tab - 0

num selected tab- 0

tab width ratio - 0x258


See Also:   org.apache.poi.hssf.record.WindowOneRecord
See Also:   org.apache.poi.hssf.record.Record record containing a WindowOneRecord




createWindowProtect
protected Record createWindowProtect()(Code)
creates the WindowProtect record with protect set to false.
See Also:   org.apache.poi.hssf.record.WindowProtectRecord
See Also:   org.apache.poi.hssf.record.Record record containing a WindowProtectRecord



createWorkbook
public static Workbook createWorkbook(List recs)(Code)
read support for low level API. Pass in an array of Record objects, A Workbook object is constructed and passed back with all of its initialization set to the passed in records and references to those records held. Unlike Sheet workbook does not use an offset (its assumed to be 0) since its first in a file. If you need an offset then construct a new array with a 0 offset or write your own ;-p.
Parameters:
  recs - an array of Record objects Workbook object



createWorkbook
public static Workbook createWorkbook()(Code)
Creates an empty workbook object with three blank sheets and all the empty fields. Use this to create a workbook from scratch.



createWriteAccess
protected Record createWriteAccess()(Code)
creates the WriteAccess record containing the logged in user's name
See Also:   org.apache.poi.hssf.record.WriteAccessRecord
See Also:   org.apache.poi.hssf.record.Record record containing a WriteAccessRecord



doesContainsSheetName
public boolean doesContainsSheetName(String name, int excludeSheetIdx)(Code)
Determines whether a workbook contains the privided sheet name.
Parameters:
  name - the name to test
Parameters:
  excludeSheetIdx - the sheet to exclude from the check or -1 to include all sheets in the check. true if the sheet contains the name, false otherwise.



findFirstRecordBySid
public Record findFirstRecordBySid(short sid)(Code)
Returns the first occurance of a record matching a particular sid.



findFirstRecordLocBySid
public int findFirstRecordLocBySid(short sid)(Code)
Returns the index of a record matching a particular sid.
Parameters:
  sid - The sid of the record to match The index of -1 if no match made.



findNextRecordBySid
public Record findNextRecordBySid(short sid, int pos)(Code)
Returns the next occurance of a record matching a particular sid.



findSheetNameFromExternSheet
public String findSheetNameFromExternSheet(short num)(Code)
finds the sheet name by his extern sheet index
Parameters:
  num - extern sheet index sheet name



getBSERecord
public EscherBSERecord getBSERecord(int pictureIndex)(Code)



getBackupRecord
public BackupRecord getBackupRecord()(Code)
Returns the position of the backup record.



getCustomPalette
public PaletteRecord getCustomPalette()(Code)
Returns the custom palette in use for this workbook; if a custom palette record does not exist, then it is created.



getDrawingManager
public DrawingManager2 getDrawingManager()(Code)



getExFormatAt
public ExtendedFormatRecord getExFormatAt(int index)(Code)
gets the ExtendedFormatRecord at the given 0-based index
Parameters:
  index - of the Extended format record (0-based) ExtendedFormatRecord at the given index



getFileSharing
public FileSharingRecord getFileSharing()(Code)



getFontRecordAt
public FontRecord getFontRecordAt(int idx)(Code)
gets the font record at the given index in the font table. Remember "There is No Four" (someone at M$ must have gone to Rocky Horror one too many times)
Parameters:
  idx - the index to look at (0 or greater but NOT 4) FontRecord located at the given index



getFormat
public short getFormat(String format, boolean createIfNotFound)(Code)
Returns a format index that matches the passed in format. It does not tie into HSSFDataFormat.
Parameters:
  format - the format string
Parameters:
  createIfNotFound - creates a new format if format not found the format id of a format that matches or -1 if none found and createIfNotFound



getFormats
public ArrayList getFormats()(Code)
Returns the list of FormatRecords in the workbook. ArrayList of FormatRecords in the notebook



getNameRecord
public NameRecord getNameRecord(int index)(Code)
gets the name record
Parameters:
  index - name index name record



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



getNumNames
public int getNumNames()(Code)
gets the total number of names number of names



getNumRecords
public int getNumRecords()(Code)



getNumSheets
public int getNumSheets()(Code)
returns the number of boundsheet objects contained in this workbook. number of BoundSheet records



getNumberOfFontRecords
public int getNumberOfFontRecords()(Code)
gets the number of font records number of font records in the "font table"



getRecords
public List getRecords()(Code)



getSSTString
public UnicodeString getSSTString(int str)(Code)
given an index into the SST table, this function returns the corresponding String value String containing the SST String



getSheetIndex
public int getSheetIndex(String name)(Code)
get the sheet's index
Parameters:
  name - sheet name sheet index or -1 if it was not found.



getSheetIndexFromExternSheetIndex
public int getSheetIndexFromExternSheetIndex(int externSheetNumber)(Code)
Finds the sheet index for a particular external sheet number.
Parameters:
  externSheetNumber - The external sheet number to convert The index to the sheet found.



getSheetName
public String getSheetName(int sheetnum)(Code)
gets the name for a given sheet.
Parameters:
  sheetnum - the sheet number (0 based) sheetname the name for the sheet



getSheetReferences
public SheetReferences getSheetReferences()(Code)



getSize
public int getSize()(Code)



getSpecificBuiltinRecord
public NameRecord getSpecificBuiltinRecord(byte name, int sheetIndex)(Code)
Retrieves the Builtin NameRecord that matches the name and index There shouldn't be too many names to make the sequential search too slow
Parameters:
  name - byte representation of the builtin name to match
Parameters:
  sheetIndex - Index to match null if no builtin NameRecord matches



getWindowOne
public WindowOneRecord getWindowOne()(Code)



getWriteAccess
public WriteAccessRecord getWriteAccess()(Code)



getWriteProtect
public WriteProtectRecord getWriteProtect()(Code)



insertSST
public void insertSST()(Code)
use this function to add a Shared String Table to an existing sheet (say generated by a different java api) without an sst....
See Also:   Workbook.createSST()
See Also:   org.apache.poi.hssf.record.SSTRecord



isUsing1904DateWindowing
public boolean isUsing1904DateWindowing()(Code)
Whether date windowing is based on 1/2/1904 or 1/1/1900. Some versions of Excel (Mac) can save workbooks using 1904 date windowing. true if using 1904 date windowing



removeBuiltinRecord
public void removeBuiltinRecord(byte name, int sheetIndex)(Code)
Removes the specified Builtin NameRecord that matches the name and index
Parameters:
  name - byte representation of the builtin to match
Parameters:
  sheetIndex - zero-based sheet reference



removeName
public void removeName(int namenum)(Code)
removes the name
Parameters:
  namenum - name index



removeSheet
public void removeSheet(int sheetnum)(Code)



serialize
public int serialize(int offset, byte[] data)(Code)
Serializes all records int the worksheet section into a big byte array. Use this to write the Workbook out.
Parameters:
  offset - of the data to be written
Parameters:
  data - array of bytes to write this to



setSheetBof
public void setSheetBof(int sheetnum, int pos)(Code)
Sets the BOF for a given sheet
Parameters:
  sheetnum - the number of the sheet to set the positing of the bof for
Parameters:
  pos - the actual bof position



setSheetName
public void setSheetName(int sheetnum, String sheetname)(Code)
sets the name for a given sheet. If the boundsheet record doesn't exist and its only one more than we have, go ahead and create it. If its > 1 more than we have, except
Parameters:
  sheetnum - the sheet number (0 based)
Parameters:
  sheetname - the name for the sheet



setSheetName
public void setSheetName(int sheetnum, String sheetname, short encoding)(Code)
sets the name for a given sheet forcing the encoding. This is STILL A BAD IDEA. Poi now automatically detects unicode
Parameters:
  sheetnum - the sheet number (0 based)
Parameters:
  sheetname - the name for the sheet



setSheetOrder
public void setSheetOrder(String sheetname, int pos)(Code)
sets the order of appearance for a given sheet.
Parameters:
  sheetname - the name of the sheet to reorder
Parameters:
  pos - the position that we want to insert the sheet into (0 based)



unwriteProtectWorkbook
public void unwriteProtectWorkbook()(Code)
removes the write protect flag



writeProtectWorkbook
public void writeProtectWorkbook(String password, String username)(Code)
protect a workbook with a password (not encypted, just sets writeprotect flags and the password.
Parameters:
  password - to set



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.