public class JChemExcelAPI extends Object
| Constructor and Description |
|---|
JChemExcelAPI(Workbook wb,
OutputStream output)
Constructor for adding molecule/structure data one-by-one
to store them in a JChemExcel workbook.
|
| Modifier and Type | Method and Description |
|---|---|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
byte[] structureData)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
byte[] structureData,
String format)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
byte[] structureData,
String id,
boolean showId)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
byte[] structureData,
String format,
String id,
boolean showId)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
Molecule molecule,
String targetFormat)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
Molecule molecule,
String targetFormat,
String id,
boolean showId)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
String structure)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
String structure,
String format)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
String structure,
String id,
boolean showId)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
Cell |
addStructure(String worksheetName,
int columnIndex,
int rowIndex,
String structure,
String format,
String id,
boolean showId)
Adds a structure to the cell in the given column/row on the sheet with the given name.
|
void |
finalize() |
void |
finish()
Writes the workbook to the stream, and closes the stream.
|
Sheet |
getOrCreateWorksheet(String worksheetName) |
Workbook |
getWorkbook()
Returns the Workbook object model instance
|
public JChemExcelAPI(Workbook wb, OutputStream output) throws FileNotFoundException, chemaxon.license.LicenseException
wb - the workbook the structures should be added tooutput - the stream to be written the workbook toFileNotFoundExceptionchemaxon.license.LicenseExceptionpublic Workbook getWorkbook()
public Cell addStructure(String worksheetName, int columnIndex, int rowIndex, Molecule molecule, String targetFormat) throws IOException, MolFormatException, chemaxon.util.ArgumentException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tomolecule - the molecule object of the structuretargetFormat - the structure format the molecule will be stored on the structure-sheetIOExceptionMolFormatExceptionchemaxon.util.ArgumentExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, Molecule molecule, String targetFormat, String id, boolean showId) throws IOException, MolFormatException, chemaxon.util.ArgumentException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tomolecule - the molecule object of the structuretargetFormat - the structure format the molecule will be stored on the structure-sheetid - an Id for the structure also added to the cell (as =JCIDSYSStructure(...,id))showId - shows the Id instead of the structure by defaultIOExceptionMolFormatExceptionchemaxon.util.ArgumentExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, String structure) throws MolFormatException, chemaxon.util.ArgumentException, UnsupportedEncodingException, IOException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructure - the structure stringMolFormatExceptionchemaxon.util.ArgumentExceptionUnsupportedEncodingExceptionIOExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, String structure, String format) throws UnsupportedEncodingException, MolFormatException, chemaxon.util.ArgumentException, IOException, UnsupportedOperationException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructure - the structure stringformat - the structure string formatUnsupportedEncodingExceptionMolFormatExceptionchemaxon.util.ArgumentExceptionIOExceptionUnsupportedOperationExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, String structure, String id, boolean showId) throws MolFormatException, chemaxon.util.ArgumentException, UnsupportedEncodingException, IOException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructure - the structure stringid - an Id for the structure also added to the cell (as =JCIDSYSStructure(...,id))MolFormatExceptionchemaxon.util.ArgumentExceptionUnsupportedEncodingExceptionIOExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, String structure, String format, String id, boolean showId) throws UnsupportedEncodingException, MolFormatException, chemaxon.util.ArgumentException, IOException, UnsupportedOperationException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructure - the structure stringformat - the structure string formatid - an Id for the structure also added to the cell (as =JCIDSYSStructure(...,id))showId - shows the Id instead of the structure by defaultUnsupportedEncodingExceptionMolFormatExceptionchemaxon.util.ArgumentExceptionIOExceptionUnsupportedOperationExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, byte[] structureData) throws MolFormatException, chemaxon.util.ArgumentException, IOException, UnsupportedOperationException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructureData - the structure data byte-arrayMolFormatExceptionchemaxon.util.ArgumentExceptionIOExceptionUnsupportedOperationExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, byte[] structureData, String id, boolean showId) throws MolFormatException, chemaxon.util.ArgumentException, IOException, UnsupportedOperationException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructureData - the structure data byte-arrayid - an Id for the structure also added to the cell (as =JCIDSYSStructure(...,id))showId - shows the Id instead of the structure by defaultMolFormatExceptionchemaxon.util.ArgumentExceptionIOExceptionUnsupportedOperationExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, byte[] structureData, String format) throws UnsupportedOperationException, IOException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructureData - the structure data byte-arrayformat - the structure data formatUnsupportedOperationExceptionIOExceptionpublic Cell addStructure(String worksheetName, int columnIndex, int rowIndex, byte[] structureData, String format, String id, boolean showId) throws UnsupportedOperationException, IOException
worksheetName - sheet name of the structure added tocolumnIndex - the column-index of the cell the structure added torowIndex - the row-index of the cell the structure added tostructureData - the structure data byte-arrayformat - the structure data formatid - an Id for the structure also added to the cell (as =JCIDSYSStructure(...,id))showId - shows the Id instead of the structure by defaultUnsupportedOperationExceptionIOExceptionpublic void finish()
throws IOException
IOException