Class WorkbookUtils

java.lang.Object
ca.phon.app.excel.WorkbookUtils

public class WorkbookUtils extends Object
Utility methods for working with Excel workbook files.
  • Constructor Details

    • WorkbookUtils

      public WorkbookUtils()
  • Method Details

    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Throws:
      jxl.write.biff.RowsExceededException
      jxl.write.WriteException
    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table, boolean useIntegerForBoolean) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Throws:
      jxl.write.biff.RowsExceededException
      jxl.write.WriteException
    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table, List<String> columns) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Throws:
      jxl.write.biff.RowsExceededException
      jxl.write.WriteException
    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table, List<String> columns, boolean useIntegerForBoolean) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Add table to the given sheet starting at row. Only print given columns.
      Parameters:
      sheet -
      startRow -
      table -
      columns -
      Throws:
      jxl.write.WriteException
      jxl.write.biff.RowsExceededException
    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, TableModel tableModel) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Throws:
      jxl.write.biff.RowsExceededException
      jxl.write.WriteException
    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, TableModel tableModel, List<String> columns) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Throws:
      jxl.write.biff.RowsExceededException
      jxl.write.WriteException
    • addTableToSheet

      public static int addTableToSheet(jxl.write.WritableSheet sheet, int startRow, TableModel tableModel, List<String> columns, boolean useIntegerForBoolean) throws jxl.write.biff.RowsExceededException, jxl.write.WriteException
      Add csv table model to workbook sheet.
      Parameters:
      sheet -
      startRow -
      tableModel -
      columns -
      Throws:
      jxl.write.biff.RowsExceededException
      jxl.write.WriteException
    • sanitizeTabName

      public static String sanitizeTabName(String name)
      Sanitize name of excel tab.
      Parameters:
      name -
      Returns:
      version of name which complies to excel specification