org.zkoss.zss.model.impl.html
Class ToHtml

java.lang.Object
  extended by org.zkoss.zss.model.impl.html.ToHtml

public class ToHtml
extends java.lang.Object

This example shows how to display a spreadsheet in HTML using the classes for spreadsheet display.

Author:
Ken Arnold, Industrious Media LLC

Method Summary
static ToHtml create(Book wb, java.io.OutputStream output)
          Creates a new converter to HTML for the given workbook.
static ToHtml create(java.io.InputStream in, java.io.OutputStream output)
          Creates a new converter to HTML for the given workbook.
static ToHtml create(java.lang.String path, java.io.OutputStream output)
          Creates a new converter to HTML for the given workbook.
static ToHtml create(Worksheet ws, java.io.OutputStream output)
           
static void export(org.zkoss.poi.ss.usermodel.Workbook wb, java.io.OutputStream outputStream)
           
static void export(org.zkoss.poi.ss.usermodel.Workbook wb, java.io.OutputStream outputStream, boolean noHeader)
           
static void export(Worksheet ws, org.zkoss.poi.ss.util.AreaReference area, java.io.OutputStream outputStream)
           
static void export(Worksheet ws, org.zkoss.poi.ss.util.AreaReference area, java.io.OutputStream outputStream, boolean noHeader)
           
static void export(Worksheet ws, java.io.OutputStream outputStream)
           
static void export(Worksheet ws, java.io.OutputStream outputStream, boolean noHeader)
           
static void main(java.lang.String[] args)
          Run this class as a program
 void print()
           
 void printPage()
           
 void printSheet(org.zkoss.poi.ss.usermodel.Sheet sheet)
           
 void printStyles()
           
 void setCompleteHTML(boolean completeHTML)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static ToHtml create(Book wb,
                            java.io.OutputStream output)
Creates a new converter to HTML for the given workbook.

Parameters:
wb - The workbook.
output - Where the HTML output will be written.
Returns:
An object for converting the workbook to HTML.

create

public static ToHtml create(Worksheet ws,
                            java.io.OutputStream output)

create

public static ToHtml create(java.lang.String path,
                            java.io.OutputStream output)
                     throws java.io.IOException
Creates a new converter to HTML for the given workbook. If the path ends with ".xlsx" an XSSFWorkbook will be used; otherwise this will use an HSSFWorkbook.

Parameters:
path - The file that has the workbook.
output - Where the HTML output will be written.
Returns:
An object for converting the workbook to HTML.
Throws:
java.io.IOException

create

public static ToHtml create(java.io.InputStream in,
                            java.io.OutputStream output)
                     throws java.io.IOException
Creates a new converter to HTML for the given workbook. This attempts to detect whether the input is XML (so it should create an XSSFWorkbook or not (so it should create an HSSFWorkbook).

Parameters:
in - The input stream that has the workbook.
output - Where the HTML output will be written.
Returns:
An object for converting the workbook to HTML.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Run this class as a program

Parameters:
args - The command line arguments.
Throws:
java.lang.Exception - Exception we don't recover from.

export

public static void export(org.zkoss.poi.ss.usermodel.Workbook wb,
                          java.io.OutputStream outputStream,
                          boolean noHeader)
                   throws java.lang.Exception
Throws:
java.lang.Exception

export

public static void export(Worksheet ws,
                          java.io.OutputStream outputStream,
                          boolean noHeader)
                   throws java.lang.Exception
Throws:
java.lang.Exception

export

public static void export(Worksheet ws,
                          org.zkoss.poi.ss.util.AreaReference area,
                          java.io.OutputStream outputStream,
                          boolean noHeader)
                   throws java.lang.Exception
Throws:
java.lang.Exception

export

public static void export(org.zkoss.poi.ss.usermodel.Workbook wb,
                          java.io.OutputStream outputStream)
                   throws java.lang.Exception
Throws:
java.lang.Exception

export

public static void export(Worksheet ws,
                          java.io.OutputStream outputStream)
                   throws java.lang.Exception
Throws:
java.lang.Exception

export

public static void export(Worksheet ws,
                          org.zkoss.poi.ss.util.AreaReference area,
                          java.io.OutputStream outputStream)
                   throws java.lang.Exception
Throws:
java.lang.Exception

setCompleteHTML

public void setCompleteHTML(boolean completeHTML)

printPage

public void printPage()
               throws java.io.IOException
Throws:
java.io.IOException

print

public void print()

printStyles

public void printStyles()

printSheet

public void printSheet(org.zkoss.poi.ss.usermodel.Sheet sheet)


Copyright © 2005-2010 Potix Corporation. All Rights Reserved. SourceForge.net Logo