Package ca.phon.app.excel
Class WorkbookUtils
java.lang.Object
ca.phon.app.excel.WorkbookUtils
Utility methods for working with Excel workbook files.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table) static int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table, boolean useIntegerForBoolean) static int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table, List<String> columns) static int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, DefaultTableDataSource table, List<String> columns, boolean useIntegerForBoolean) Add table to the given sheet starting at row.static int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, TableModel tableModel) static int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, TableModel tableModel, List<String> columns) static int
addTableToSheet
(jxl.write.WritableSheet sheet, int startRow, TableModel tableModel, List<String> columns, boolean useIntegerForBoolean) Add csv table model to workbook sheet.static String
sanitizeTabName
(String name) Sanitize name of excel tab.
-
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
Sanitize name of excel tab.- Parameters:
name
-- Returns:
- version of name which complies to excel specification
-