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 toFileNotFoundException
chemaxon.license.LicenseException
public 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-sheetIOException
MolFormatException
chemaxon.util.ArgumentException
public 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 defaultIOException
MolFormatException
chemaxon.util.ArgumentException
public 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 stringMolFormatException
chemaxon.util.ArgumentException
UnsupportedEncodingException
IOException
public 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 formatUnsupportedEncodingException
MolFormatException
chemaxon.util.ArgumentException
IOException
UnsupportedOperationException
public 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))MolFormatException
chemaxon.util.ArgumentException
UnsupportedEncodingException
IOException
public 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 defaultUnsupportedEncodingException
MolFormatException
chemaxon.util.ArgumentException
IOException
UnsupportedOperationException
public 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-arrayMolFormatException
chemaxon.util.ArgumentException
IOException
UnsupportedOperationException
public 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 defaultMolFormatException
chemaxon.util.ArgumentException
IOException
UnsupportedOperationException
public 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 formatUnsupportedOperationException
IOException
public 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 defaultUnsupportedOperationException
IOException
public void finish() throws IOException
IOException