Search in sources :

Example 1 with JXLException

use of jxl.JXLException in project network-monitor by caarmen.

the class ExcelExport method writeFooter.

@Override
void writeFooter() throws IOException {
    Log.v(TAG, "writeFooter");
    try {
        for (int i = 0; i < mColumnCount; i++) resizeColumn(i);
        // Set the heading row height to 4 lines tall.  Using autoSize doesn't seem to work (the resulting file has only one row of characters in the header row).
        // Not sure how to dynamically calculate the optimal height of the header row, so we just assume the largest column heading will be four lines tall.
        CellView headerRowView = mSheet.getRowView(0);
        headerRowView.setSize(headerRowView.getSize() * 4);
        mSheet.setRowView(0, headerRowView);
        mWorkbook.write();
        mWorkbook.close();
    } catch (JXLException e) {
        Log.e(TAG, "writeHeader Could not close file", e);
    }
}
Also used : JXLException(jxl.JXLException) CellView(jxl.CellView)

Aggregations

CellView (jxl.CellView)1 JXLException (jxl.JXLException)1