Java org.apache.poi.hssf.usermodel HSSFWorkbook fields, constructors, methods, implement or subclass

Example usage for Java org.apache.poi.hssf.usermodel HSSFWorkbook fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.poi.hssf.usermodel HSSFWorkbook.

The text is from its open source code.

Constructor

HSSFWorkbook()
Creates new HSSFWorkbook from scratch (start here!)
HSSFWorkbook(InternalWorkbook book)
HSSFWorkbook(POIFSFileSystem fs)
Given a POI POIFSFileSystem object, read in its Workbook along with all related nodes, and populate the high and low level models.
HSSFWorkbook(InputStream s)
Companion to HSSFWorkbook(POIFSFileSystem), this constructs the POI filesystem around your InputStream , including all nodes.
HSSFWorkbook(POIFSFileSystem fs, boolean preserveNodes)
Given a POI POIFSFileSystem object, read in its Workbook and populate the high and low level models.
HSSFWorkbook(DirectoryNode directory, boolean preserveNodes)
given a POI POIFSFileSystem object, and a specific directory within it, read in its Workbook and populate the high and low level models.
HSSFWorkbook(InputStream s, boolean preserveNodes)
Companion to HSSFWorkbook(POIFSFileSystem), this constructs the POI filesystem around your InputStream .

Method

intaddPicture(byte[] pictureData, int format)
Adds a picture to the workbook.
HSSFSheetcloneSheet(int sheetIndex)
create an HSSFSheet from an existing sheet in the HSSFWorkbook.
voidclose()
Closes the underlying POIFSFileSystem from which the Workbook was read, if any.
HSSFWorkbookcreate(InternalWorkbook book)
HSSFCellStylecreateCellStyle()
Create a new Cell style and add it to the workbook's style table.
HSSFDataFormatcreateDataFormat()
Returns the instance of HSSFDataFormat for this workbook.
HSSFFontcreateFont()
create a new Font and add it to the workbook's font table
voidcreateInformationProperties()
Will create whichever of SummaryInformation and DocumentSummaryInformation (HPSF) properties are not already part of your document.
HSSFNamecreateName()
creates a new named range and add it to the model
HSSFSheetcreateSheet()
create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns the high level representation.
HSSFSheetcreateSheet(String sheetname)
Create a new sheet for this Workbook and return the high level representation.
intgetActiveSheetIndex()
gets the tab whose data is actually seen when the sheet is opened.
ListgetAllEmbeddedObjects()
Gets all embedded OLE2 objects from the Workbook.
ListgetAllPictures()
Gets all pictures from the Workbook.
byte[]getBytes()
Method getBytes - get the bytes of just the HSSF portions of the XLS file.
HSSFCellStylegetCellStyleAt(int idx)
get the cell style object at the given index
HSSFCreationHelpergetCreationHelper()
HSSFPalettegetCustomPalette()
DocumentSummaryInformationgetDocumentSummaryInformation()
Fetch the Document Summary Information of the document
HSSFFontgetFontAt(short idx)
HSSFFontgetFontAt(int idx)
HSSFNamegetName(String name)
HSSFNamegetNameAt(int nameIndex)
intgetNameIndex(String name)
intgetNameIndex(HSSFName name)
As #getNameIndex(String) is not necessarily unique (name + sheet index is unique), this method is more accurate.
shortgetNumberOfFonts()
intgetNumberOfNames()
intgetNumberOfSheets()
get the number of spreadsheets in the workbook (this will be three after serialization)
intgetNumCellStyles()
get the number of styles the workbook contains
HSSFSheetgetSheet(String name)
Get sheet with the given name (case insensitive match)
HSSFSheetgetSheetAt(int index)
Get the HSSFSheet object at the given index.
intgetSheetIndex(String name)
Returns the index of the sheet by his name
intgetSheetIndex(org.apache.poi.ss.usermodel.Sheet sheet)
Returns the index of the given sheet
StringgetSheetName(int sheetIndex)
SummaryInformationgetSummaryInformation()
Fetch the Summary Information of the document
voidremoveSheetAt(int index)
Removes sheet at the given index.

Care must be taken if the removed sheet is the currently active or only selected sheet in the workbook.

voidsetPrintArea(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow)
For the Convenience of Java Programmers maintaining pointers.
voidsetSheetName(int sheetIx, String name)
Set the sheet name.
voidsetSheetOrder(String sheetname, int pos)
sets the order of appearance for a given sheet.
voidwrite(File newFile)
Method write - write out this workbook to a new File .
voidwrite(OutputStream stream)
Method write - write out this workbook to an OutputStream .
voidwrite(POIFSFileSystem fs)
Writes the workbook out to a brand new, empty POIFS
voidwriteProtectWorkbook(String password, String username)
protect a workbook with a password (not encypted, just sets writeprotect flags and the password.