Example usage for Java org.apache.poi.hssf.usermodel HSSFWorkbook fields, constructors, methods, implement or subclass
The text is from its open source code.
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 . |
int | addPicture(byte[] pictureData, int format) Adds a picture to the workbook. |
HSSFSheet | cloneSheet(int sheetIndex) create an HSSFSheet from an existing sheet in the HSSFWorkbook. |
void | close() Closes the underlying POIFSFileSystem from which the Workbook was read, if any. |
HSSFWorkbook | create(InternalWorkbook book) |
HSSFCellStyle | createCellStyle() Create a new Cell style and add it to the workbook's style table. |
HSSFDataFormat | createDataFormat() Returns the instance of HSSFDataFormat for this workbook. |
HSSFFont | createFont() create a new Font and add it to the workbook's font table |
void | createInformationProperties() Will create whichever of SummaryInformation and DocumentSummaryInformation (HPSF) properties are not already part of your document. |
HSSFName | createName() creates a new named range and add it to the model |
HSSFSheet | createSheet() create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns the high level representation. |
HSSFSheet | createSheet(String sheetname) Create a new sheet for this Workbook and return the high level representation. |
int | getActiveSheetIndex() gets the tab whose data is actually seen when the sheet is opened. |
List | getAllEmbeddedObjects() Gets all embedded OLE2 objects from the Workbook. |
List | getAllPictures() Gets all pictures from the Workbook. |
byte[] | getBytes() Method getBytes - get the bytes of just the HSSF portions of the XLS file. |
HSSFCellStyle | getCellStyleAt(int idx) get the cell style object at the given index |
HSSFCreationHelper | getCreationHelper() |
HSSFPalette | getCustomPalette() |
DocumentSummaryInformation | getDocumentSummaryInformation() Fetch the Document Summary Information of the document |
HSSFFont | getFontAt(short idx) |
HSSFFont | getFontAt(int idx) |
HSSFName | getName(String name) |
HSSFName | getNameAt(int nameIndex) |
int | getNameIndex(String name) |
int | getNameIndex(HSSFName name) As #getNameIndex(String) is not necessarily unique (name + sheet index is unique), this method is more accurate. |
short | getNumberOfFonts() |
int | getNumberOfNames() |
int | getNumberOfSheets() get the number of spreadsheets in the workbook (this will be three after serialization) |
int | getNumCellStyles() get the number of styles the workbook contains |
HSSFSheet | getSheet(String name) Get sheet with the given name (case insensitive match) |
HSSFSheet | getSheetAt(int index) Get the HSSFSheet object at the given index. |
int | getSheetIndex(String name) Returns the index of the sheet by his name |
int | getSheetIndex(org.apache.poi.ss.usermodel.Sheet sheet) Returns the index of the given sheet |
String | getSheetName(int sheetIndex) |
SummaryInformation | getSummaryInformation() Fetch the Summary Information of the document |
void | removeSheetAt(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. |
void | setPrintArea(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow) For the Convenience of Java Programmers maintaining pointers. |
void | setSheetName(int sheetIx, String name) Set the sheet name. |
void | setSheetOrder(String sheetname, int pos) sets the order of appearance for a given sheet. |
void | write(File newFile) Method write - write out this workbook to a new File . |
void | write(OutputStream stream) Method write - write out this workbook to an OutputStream . |
void | write(POIFSFileSystem fs) Writes the workbook out to a brand new, empty POIFS |
void | writeProtectWorkbook(String password, String username) protect a workbook with a password (not encypted, just sets writeprotect flags and the password. |