com.extentech.ExtenXLS
Class ExtenXLS

java.lang.Object
  extended by com.extentech.ExtenXLS.ExtenXLS
All Implemented Interfaces:
com.extentech.toolkit.LogOutputter

public class ExtenXLS
extends Object
implements com.extentech.toolkit.LogOutputter

Useful Entry-Point for ExtenXLS functionality.
Provides helpful, command-line methods.

Command line parameters:
-x initialize Excel Template
-o name of output file or "stdout" for System.out
-xls
-xml output XML representation of file
-bindfile transform using XML Report Definition File (RDF)

for example:

read in template.xls, output templateout.xml in XML format

-xtemplate.xls -otemplateout.xml -fxml


Read in template.xls, output to stdout in XLS format:


java com.extentech.ExtenXLS.ExtenXLS -xTemplate.xls-oTemplateout.xml -fxml

Read in an rdf and parameters:
java com.extentech.ExtenXLS.ExtenXLS -rMyReport.rdf -oMyOutPut.xls -fxls


Version:
4.1
Author:
John McMahon -- Copyright ©2011Extentech Inc.

Field Summary
static int COLSIZE_DIVISOR
           
static int COMMAND_ADDALIGNMENT
           
static int COMMAND_ADDBORDERS
           
static int COMMAND_ADDCELL
           
static int COMMAND_ADDCELLDATA
           
static int COMMAND_ADDCELLPROTECT
           
static int COMMAND_ADDCHART
           
static int COMMAND_ADDCHARTFONT
           
static int COMMAND_ADDCHARTFONTREC
           
static int COMMAND_ADDCHARTOPTIONS
           
static int COMMAND_ADDCHARTSERIES
           
static int COMMAND_ADDCOLORS
           
static int COMMAND_ADDCOLUMNS
           
static int COMMAND_ADDCONDITIONALFORMAT
           
static int COMMAND_ADDDATARANGE
           
static int COMMAND_ADDEXTERNALNAME
           
static int COMMAND_ADDFONT
           
static int COMMAND_ADDIMAGES
           
static int COMMAND_ADDNAME
           
static int COMMAND_ADDNUMBERFORMAT
           
static int COMMAND_ADDPANE
           
static int COMMAND_ADDROW
           
static int COMMAND_ADDSHEET
           
static int COMMAND_ADDTHREEDREC
           
static int COMMAND_ADDVALIDATION
           
static int COMMAND_ADDVALIDATIONFORMULA1
           
static int COMMAND_ADDVALIDATIONFORMULA2
           
static int COMMAND_ADDWINDOWOPTIONS
           
static int COMMAND_AXISOPTIONS
           
static Writer dump_input
          A Writer to which a record dump should be written on input.
static String JSON_CELL
           
static String JSON_CELL_FORMATTED_VALUE
           
static String JSON_CELL_FORMULA
           
static String JSON_CELL_VALUE
           
static String JSON_CELLS
           
static String JSON_DATA
           
static String JSON_DATETIME
           
static String JSON_DATEVALUE
           
static String JSON_DOUBLE
           
static String JSON_FLOAT
           
static String JSON_FORMULA_HIDDEN
           
static String JSON_HEIGHT
           
static String JSON_HIDDEN
           
static String JSON_HREF
           
static String JSON_INTEGER
           
static String JSON_LOCATION
           
static String JSON_LOCKED
           
static String JSON_MERGEACROSS
           
static String JSON_MERGECHILD
           
static String JSON_MERGEDOWN
           
static String JSON_MERGEPARENT
           
static String JSON_RANGE
           
static String JSON_RED_FORMAT
           
static String JSON_ROW
           
static String JSON_STRING
           
static String JSON_STYLEID
           
static String JSON_TYPE
           
static String JSON_VALIDATION_MESSAGE
           
static String JSON_WORD_WRAP
           
static int ROW_HEIGHT_DIVISOR
           
static String XML_HEAD
           
 
Constructor Summary
ExtenXLS()
           
 
Method Summary
static void addImages(org.xmlpull.v1.XmlPullParser xpp, com.extentech.formats.XLS.Boundsheet bound)
          Takes XML defining images and adds the images defined in it into the specific position in the sheet
static void dumpCSVtoSpreadsheet(File csv, WorkBook book, int sheetnum)
          simply read the csv into a workbook set the "com.extentech.extenxls.csvdelimiter" system property to change the delimiter aka: System.getProperties().setProperty("com.extentech.extenxls.csvdelimiter", "|");
static void dumpCSVtoSpreadsheet(InputStream csv, WorkBook book, int sheetnum)
          simply read the csv into a workbook set the "com.extentech.extenxls.csvdelimiter" system property to change the delimiter aka: System.getProperties().setProperty("com.extentech.extenxls.csvdelimiter", "|");
static ByteArrayOutputStream getDocumentBytes(org.jdom.Document d)
          output the DOM to ByteArrayOutputStream
static String getJSON(CellHandle ch)
          Get a JSON representation of a cell utilizing a merged range identifier
static String getJSON(CellHandle ch, int[] mergedRange)
          Get a JSON representation of a cell utilizing a merged range identifier
static String getJSON(CellRange cr)
          Get a JSON representation of a cellRange
static String getJSON(ImageHandle ih)
          Get a JSON representation of an Image
static String getJSON(NameHandle nh)
          Get a JSON representation of a NamedRange
static String getJSON(RowHandle rh)
          Get a JSON representation of a row
static org.json.JSONObject getJSONObject(CellHandle ch)
          Get a JSON representation of a cell utilizing a merged range identifier
static org.json.JSONObject getJSONObject(CellHandle ch, int[] mergedRange)
          Get a JSON Object representation of a cell utilizing a merged range identifier
static org.json.JSONObject getJSONObject(NameHandle rh)
          Get a JSON representation of a NamedRange
static org.json.JSONObject getJSONObject(RowHandle rh)
          Get a org.JSON object representation of a row
static org.json.JSONObject getJSONObject(RowHandle rh, int maxcols)
          Get a org.JSON object representation of a row, limit number of cols of data
static File getPDF(WorkBook book)
           
static File getPDF(WorkBook book, int height, int width)
           
static String getSheetXML(WorkBook mybook, String sheetname)
          Get the XML for a worksheet
static String getSheetXML(WorkBook mybook, String sheetname, int maxrows, int maxcols)
          Get the XML for a worksheet Add the ability to return a maximum number of rows and cols -1 returns all cols/rows
static String getStyleHTML(CellHandle cx)
          Get an HTML representation of the Cell Style
static WorkBook getXLS(Object xmlsource)
          Convert an XML WorkBook file to BIFF8 (native XLS) WorkBook Input roughly conforms to XMLSS Spec.
static WorkBook getXLS(WorkBookHandle bk, Object xmlsource)
          Convert an XML WorkBook file to BIFF8 (native XLS) WorkBook Input roughly conforms to XMLSS Spec.
static WorkBook getXLS(WorkBook bk, Object xmlsource)
          Convert a WorkBook XML file to BIFF8 (native XLS) WorkBook Input roughly conforms to XMLSS Spec.
static String getXML(WorkBook mybook)
          Convert a BIFF8 (native XLS) file to XML one sheet at a time.
static String getXML(WorkBook mybook, String sheetname)
          Convert a BIFF8 (native XLS) file to XML.
static String getXML(WorkBook mybook, String sheetname, int maxrows, int maxcols)
          Convert a BIFF8 (native XLS) file to XML.
static String getXMLFragment(WorkBook mybook, String fragspec)
          Retrieves an XML 'fragment' from the Specified WorkBook.
 void log(String s)
           
 void log(String s, Exception e)
           
 void log(String s, Exception e, boolean b)
           
static void main(String[] args)
          Command line parameters: -x initialize Excel Template -o name of output file or "stdout" for System.out -xls -xml output XML representation of file -bindfile transform using XML Report Definition File (RDF) -dump example: read in template.xls, output templateout.xml in XML format -xtemplate.xls -otemplateout.xml -fxml read in template.xls, output to stdout in XLS format -xtemplate.xls -ostdout -fxls
static void parseNBind(WorkBook bk, Object input)
          Read in an XML stream and populate a WorkBook using the XML data therein.
static String readInputStream(InputStream in)
          read an inputstream into a string
static void setDebugLevel(int DEBUGLEVEL)
           
static void transform(OutputStream out, String xslfile, WorkBook book, Map params)
          Transform a WorkBook into an output file type by applying an XSLT.
static org.jdom.Document transform(String xslfile, CellRange cr, String midi)
          Transform a CellRange into an output file type by applying an XSLT.
static org.jdom.Document transform(String xslfile, NameHandle name)
          Transform a NamedRange into an output file type by applying an XSLT.
static org.jdom.Document transform(String xslfile, NameHandle name, String midi)
          Transform a NamedRange into an output file type by applying an XSLT.
static org.jdom.Document transform(String xslfile, String input, Map params)
          Transform a String into an output file type by applying an XSLT.
static org.jdom.Document transform(String xslfile, WorkBook book)
          Transform a WorkBook into an output file type by applying an XSLT.
static org.jdom.Document transform(String xslfile, WorkBook book, Map params)
          Transform a WorkBook into an output file type by applying an XSLT.
static void writeBookToFile(String strFileName, WorkBook mybook)
          Write book to File using Buffered Output Stream
static void writeBytesToFile(String strFileName, byte[] bbuf)
           
static void writeXML(WorkBook mybook, String sheetname, OutputStream out)
          Convert a BIFF8 (native XLS) file to XML.
static void writeXML(WorkBook mybook, String sheetname, OutputStream out, int maxrows, int maxcols)
          Convert a BIFF8 (native XLS) file to XML.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_HEAD

public static final String XML_HEAD
See Also:
Constant Field Values

JSON_CELL_VALUE

public static final String JSON_CELL_VALUE
See Also:
Constant Field Values

JSON_CELL_FORMATTED_VALUE

public static final String JSON_CELL_FORMATTED_VALUE
See Also:
Constant Field Values

JSON_CELL_FORMULA

public static final String JSON_CELL_FORMULA
See Also:
Constant Field Values

JSON_CELL

public static final String JSON_CELL
See Also:
Constant Field Values

JSON_CELLS

public static final String JSON_CELLS
See Also:
Constant Field Values

JSON_DATETIME

public static final String JSON_DATETIME
See Also:
Constant Field Values

JSON_DATEVALUE

public static final String JSON_DATEVALUE
See Also:
Constant Field Values

JSON_DOUBLE

public static final String JSON_DOUBLE
See Also:
Constant Field Values

JSON_RANGE

public static final String JSON_RANGE
See Also:
Constant Field Values

JSON_DATA

public static final String JSON_DATA
See Also:
Constant Field Values

JSON_FLOAT

public static final String JSON_FLOAT
See Also:
Constant Field Values

JSON_INTEGER

public static final String JSON_INTEGER
See Also:
Constant Field Values

JSON_LOCATION

public static final String JSON_LOCATION
See Also:
Constant Field Values

JSON_ROW

public static final String JSON_ROW
See Also:
Constant Field Values

JSON_HEIGHT

public static final String JSON_HEIGHT
See Also:
Constant Field Values

JSON_STRING

public static final String JSON_STRING
See Also:
Constant Field Values

JSON_STYLEID

public static final String JSON_STYLEID
See Also:
Constant Field Values

JSON_TYPE

public static final String JSON_TYPE
See Also:
Constant Field Values

JSON_FORMULA_HIDDEN

public static final String JSON_FORMULA_HIDDEN
See Also:
Constant Field Values

JSON_LOCKED

public static final String JSON_LOCKED
See Also:
Constant Field Values

JSON_HIDDEN

public static final String JSON_HIDDEN
See Also:
Constant Field Values

JSON_VALIDATION_MESSAGE

public static final String JSON_VALIDATION_MESSAGE
See Also:
Constant Field Values

JSON_MERGEACROSS

public static final String JSON_MERGEACROSS
See Also:
Constant Field Values

JSON_MERGEDOWN

public static final String JSON_MERGEDOWN
See Also:
Constant Field Values

JSON_MERGEPARENT

public static final String JSON_MERGEPARENT
See Also:
Constant Field Values

JSON_MERGECHILD

public static final String JSON_MERGECHILD
See Also:
Constant Field Values

JSON_HREF

public static final String JSON_HREF
See Also:
Constant Field Values

JSON_WORD_WRAP

public static final String JSON_WORD_WRAP
See Also:
Constant Field Values

JSON_RED_FORMAT

public static final String JSON_RED_FORMAT
See Also:
Constant Field Values

dump_input

public static Writer dump_input
A Writer to which a record dump should be written on input. This is used by the dumping code in WorkBookFactory.


COMMAND_ADDCELL

public static final int COMMAND_ADDCELL
See Also:
Constant Field Values

COMMAND_ADDSHEET

public static final int COMMAND_ADDSHEET
See Also:
Constant Field Values

COMMAND_ADDROW

public static final int COMMAND_ADDROW
See Also:
Constant Field Values

COMMAND_ADDNAME

public static final int COMMAND_ADDNAME
See Also:
Constant Field Values

COMMAND_ADDCELLDATA

public static final int COMMAND_ADDCELLDATA
See Also:
Constant Field Values

COMMAND_ADDEXTERNALNAME

public static final int COMMAND_ADDEXTERNALNAME
See Also:
Constant Field Values

COMMAND_ADDFONT

public static final int COMMAND_ADDFONT
See Also:
Constant Field Values

COMMAND_ADDBORDERS

public static final int COMMAND_ADDBORDERS
See Also:
Constant Field Values

COMMAND_ADDALIGNMENT

public static final int COMMAND_ADDALIGNMENT
See Also:
Constant Field Values

COMMAND_ADDCOLORS

public static final int COMMAND_ADDCOLORS
See Also:
Constant Field Values

COMMAND_ADDWINDOWOPTIONS

public static final int COMMAND_ADDWINDOWOPTIONS
See Also:
Constant Field Values

COMMAND_ADDCOLUMNS

public static final int COMMAND_ADDCOLUMNS
See Also:
Constant Field Values

COMMAND_ADDNUMBERFORMAT

public static final int COMMAND_ADDNUMBERFORMAT
See Also:
Constant Field Values

COMMAND_ADDCHART

public static final int COMMAND_ADDCHART
See Also:
Constant Field Values

COMMAND_ADDCHARTSERIES

public static final int COMMAND_ADDCHARTSERIES
See Also:
Constant Field Values

COMMAND_AXISOPTIONS

public static final int COMMAND_AXISOPTIONS
See Also:
Constant Field Values

COMMAND_ADDDATARANGE

public static final int COMMAND_ADDDATARANGE
See Also:
Constant Field Values

COMMAND_ADDCHARTOPTIONS

public static final int COMMAND_ADDCHARTOPTIONS
See Also:
Constant Field Values

COMMAND_ADDTHREEDREC

public static final int COMMAND_ADDTHREEDREC
See Also:
Constant Field Values

COMMAND_ADDCHARTFONT

public static final int COMMAND_ADDCHARTFONT
See Also:
Constant Field Values

COMMAND_ADDCHARTFONTREC

public static final int COMMAND_ADDCHARTFONTREC
See Also:
Constant Field Values

COMMAND_ADDIMAGES

public static final int COMMAND_ADDIMAGES
See Also:
Constant Field Values

COMMAND_ADDVALIDATION

public static final int COMMAND_ADDVALIDATION
See Also:
Constant Field Values

COMMAND_ADDVALIDATIONFORMULA1

public static final int COMMAND_ADDVALIDATIONFORMULA1
See Also:
Constant Field Values

COMMAND_ADDVALIDATIONFORMULA2

public static final int COMMAND_ADDVALIDATIONFORMULA2
See Also:
Constant Field Values

COMMAND_ADDPANE

public static final int COMMAND_ADDPANE
See Also:
Constant Field Values

COMMAND_ADDCONDITIONALFORMAT

public static final int COMMAND_ADDCONDITIONALFORMAT
See Also:
Constant Field Values

COMMAND_ADDCELLPROTECT

public static final int COMMAND_ADDCELLPROTECT
See Also:
Constant Field Values

ROW_HEIGHT_DIVISOR

public static int ROW_HEIGHT_DIVISOR

COLSIZE_DIVISOR

public static int COLSIZE_DIVISOR
Constructor Detail

ExtenXLS

public ExtenXLS()
Method Detail

main

public static void main(String[] args)
Command line parameters: -x initialize Excel Template -o name of output file or "stdout" for System.out -xls -xml output XML representation of file -bindfile transform using XML Report Definition File (RDF) -dump example: read in template.xls, output templateout.xml in XML format -xtemplate.xls -otemplateout.xml -fxml read in template.xls, output to stdout in XLS format -xtemplate.xls -ostdout -fxls


writeBytesToFile

public static void writeBytesToFile(String strFileName,
                                    byte[] bbuf)

writeBookToFile

public static void writeBookToFile(String strFileName,
                                   WorkBook mybook)
Write book to File using Buffered Output Stream

Parameters:
strFileName -
mybook -

getXMLFragment

public static String getXMLFragment(WorkBook mybook,
                                    String fragspec)
Retrieves an XML 'fragment' from the Specified WorkBook. Output roughly conforms to XMLSS Spec.

Parameters:
mybook -
Returns:

addImages

public static void addImages(org.xmlpull.v1.XmlPullParser xpp,
                             com.extentech.formats.XLS.Boundsheet bound)
Takes XML defining images and adds the images defined in it into the specific position in the sheet

Parameters:
xpp - the PullParser in the correct location, at element which defines XML in OOXML (DrawingML) format
See Also:
ImageHandle.getXML

readInputStream

public static String readInputStream(InputStream in)
read an inputstream into a string

Parameters:
in -
Returns:

parseNBind

public static void parseNBind(WorkBook bk,
                              Object input)
                       throws org.xmlpull.v1.XmlPullParserException,
                              IOException
Read in an XML stream and populate a WorkBook using the XML data therein. The XML Stream must be in ExtenXLS XML format.

Parameters:
fl -
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

getXLS

public static WorkBook getXLS(WorkBook bk,
                              Object xmlsource)
Convert a WorkBook XML file to BIFF8 (native XLS) WorkBook Input roughly conforms to XMLSS Spec.

Parameters:
the - XML input
a - workbook to populate
Returns:

setDebugLevel

public static void setDebugLevel(int DEBUGLEVEL)

getXLS

public static WorkBook getXLS(WorkBookHandle bk,
                              Object xmlsource)
                       throws Exception
Convert an XML WorkBook file to BIFF8 (native XLS) WorkBook Input roughly conforms to XMLSS Spec.

Parameters:
mybook -
Returns:
Throws:
Exception

getXLS

public static WorkBook getXLS(Object xmlsource)
Convert an XML WorkBook file to BIFF8 (native XLS) WorkBook Input roughly conforms to XMLSS Spec.

Parameters:
mybook -
Returns:

getPDF

public static File getPDF(WorkBook book)
Parameters:
bout -
Returns:

getPDF

public static File getPDF(WorkBook book,
                          int height,
                          int width)
Parameters:
bout -
Returns:

getXML

public static String getXML(WorkBook mybook)
Convert a BIFF8 (native XLS) file to XML one sheet at a time. Output roughly conforms to XMLSS Spec.

Parameters:
mybook -
sheetname -
Returns:

getSheetXML

public static String getSheetXML(WorkBook mybook,
                                 String sheetname,
                                 int maxrows,
                                 int maxcols)
Get the XML for a worksheet Add the ability to return a maximum number of rows and cols -1 returns all cols/rows

Parameters:
mybook -
sheetname -
Returns:

getSheetXML

public static String getSheetXML(WorkBook mybook,
                                 String sheetname)
Get the XML for a worksheet

Parameters:
mybook -
sheetname -
Returns:

writeXML

public static void writeXML(WorkBook mybook,
                            String sheetname,
                            OutputStream out)
Convert a BIFF8 (native XLS) file to XML. Output roughly conforms to XMLSS Spec. for more info on the XMLSS spec see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/html/odc_xmlss.asp

Parameters:
mybook -

writeXML

public static void writeXML(WorkBook mybook,
                            String sheetname,
                            OutputStream out,
                            int maxrows,
                            int maxcols)
Convert a BIFF8 (native XLS) file to XML. Output roughly conforms to XMLSS Spec. for more info on the XMLSS spec see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/html/odc_xmlss.asp

Parameters:
mybook -
maxrows - = the maximum number of rows to output in a worksheet
maxcols - = the maximum number of cols to output in a worksheet

getXML

public static String getXML(WorkBook mybook,
                            String sheetname,
                            int maxrows,
                            int maxcols)
Convert a BIFF8 (native XLS) file to XML. Output roughly conforms to XMLSS Spec. for more info on the XMLSS spec see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/html/odc_xmlss.asp

Parameters:
mybook -
Returns:

getXML

public static String getXML(WorkBook mybook,
                            String sheetname)
Convert a BIFF8 (native XLS) file to XML. Output roughly conforms to XMLSS Spec. for more info on the XMLSS spec see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/html/odc_xmlss.asp

Parameters:
mybook -
Returns:

transform

public static void transform(OutputStream out,
                             String xslfile,
                             WorkBook book,
                             Map params)
                      throws Exception
Transform a WorkBook into an output file type by applying an XSLT. Output format is an XML Document with the eventual goal of combatibility with XMLSS format.

Parameters:
xslfile -
book -
params -
Throws:
Exception

transform

public static org.jdom.Document transform(String xslfile,
                                          NameHandle name)
                                   throws Exception
Transform a NamedRange into an output file type by applying an XSLT. Output format is an XML Document with the eventual goal of combatibility with XMLSS format.

Parameters:
xslfile -
NamedRange - to be transformed
Returns:
document output
Throws:
Exception

transform

public static org.jdom.Document transform(String xslfile,
                                          CellRange cr,
                                          String midi)
                                   throws Exception
Transform a CellRange into an output file type by applying an XSLT.

Parameters:
xslfile -
Cell - Range to be transformed
midi - the meme id of the meme workbook
Returns:
document output
Throws:
Exception

transform

public static org.jdom.Document transform(String xslfile,
                                          NameHandle name,
                                          String midi)
                                   throws Exception
Transform a NamedRange into an output file type by applying an XSLT. pass in a meme id to properly handle REST api callbacks

Parameters:
xslfile -
NamedRange - to be transformed
midi - the meme id of the meme workbook
Returns:
document output
Throws:
Exception

transform

public static org.jdom.Document transform(String xslfile,
                                          String input,
                                          Map params)
                                   throws Exception
Transform a String into an output file type by applying an XSLT.

Parameters:
xslfile -
input - string to be transformed
Returns:
document output
Throws:
Exception

transform

public static org.jdom.Document transform(String xslfile,
                                          WorkBook book,
                                          Map params)
                                   throws Exception
Transform a WorkBook into an output file type by applying an XSLT. Output format is an XML Document with the eventual goal of combatibility with XMLSS format.

Parameters:
xslfile -
book -
params -
Returns:
Throws:
Exception

getJSON

public static String getJSON(ImageHandle ih)
Get a JSON representation of an Image

Parameters:
imagehandle -
Returns:
JSON String

getJSON

public static String getJSON(NameHandle nh)
Get a JSON representation of a NamedRange

Parameters:
namehandle -
Returns:
JSON String

getJSONObject

public static org.json.JSONObject getJSONObject(NameHandle rh)
Get a JSON representation of a NamedRange

Parameters:
NameHandle -
Returns:
JSONObject

getJSONObject

public static org.json.JSONObject getJSONObject(RowHandle rh,
                                                int maxcols)
Get a org.JSON object representation of a row, limit number of cols of data

Parameters:
cr -
Returns:

getJSONObject

public static org.json.JSONObject getJSONObject(RowHandle rh)
Get a org.JSON object representation of a row

Parameters:
cr -
Returns:

getJSON

public static String getJSON(RowHandle rh)
Get a JSON representation of a row

Parameters:
cr -
Returns:

getJSON

public static String getJSON(CellRange cr)
Get a JSON representation of a cellRange

Parameters:
cr -
Returns:

getStyleHTML

public static String getStyleHTML(CellHandle cx)
Get an HTML representation of the Cell Style

Parameters:
cx - the cellhandle to get the style from
Returns:
the css inline style info for the cell

getJSON

public static String getJSON(CellHandle ch)
Get a JSON representation of a cell utilizing a merged range identifier

Parameters:
ch -
Returns:

getJSONObject

public static org.json.JSONObject getJSONObject(CellHandle ch)
Get a JSON representation of a cell utilizing a merged range identifier

Parameters:
ch -
Returns:

getJSON

public static String getJSON(CellHandle ch,
                             int[] mergedRange)
Get a JSON representation of a cell utilizing a merged range identifier

Parameters:
ch -
Returns:

getJSONObject

public static org.json.JSONObject getJSONObject(CellHandle ch,
                                                int[] mergedRange)
Get a JSON Object representation of a cell utilizing a merged range identifier

Parameters:
ch -
Returns:

transform

public static org.jdom.Document transform(String xslfile,
                                          WorkBook book)
                                   throws Exception
Transform a WorkBook into an output file type by applying an XSLT. Output format is an XML Document with the eventual goal of combatibility with XMLSS format.

Parameters:
xslfile -
book -
Returns:
Throws:
Exception

dumpCSVtoSpreadsheet

public static void dumpCSVtoSpreadsheet(File csv,
                                        WorkBook book,
                                        int sheetnum)
                                 throws com.extentech.formats.XLS.WorkSheetNotFoundException
simply read the csv into a workbook set the "com.extentech.extenxls.csvdelimiter" system property to change the delimiter aka: System.getProperties().setProperty("com.extentech.extenxls.csvdelimiter", "|");

Parameters:
csv -
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException

dumpCSVtoSpreadsheet

public static void dumpCSVtoSpreadsheet(InputStream csv,
                                        WorkBook book,
                                        int sheetnum)
                                 throws com.extentech.formats.XLS.WorkSheetNotFoundException
simply read the csv into a workbook set the "com.extentech.extenxls.csvdelimiter" system property to change the delimiter aka: System.getProperties().setProperty("com.extentech.extenxls.csvdelimiter", "|");

Parameters:
csv -
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException

getDocumentBytes

public static ByteArrayOutputStream getDocumentBytes(org.jdom.Document d)
output the DOM to ByteArrayOutputStream


log

public void log(String s,
                Exception e)
Specified by:
log in interface com.extentech.toolkit.LogOutputter

log

public void log(String s)
Specified by:
log in interface com.extentech.toolkit.LogOutputter

log

public void log(String s,
                Exception e,
                boolean b)
Specified by:
log in interface com.extentech.toolkit.LogOutputter


Copyright © 2011 Extentech Inc. All Rights Reserved.