Search code examples
androidjxl

JXL - setRowView do nothing


I am trying to change the size of rows and columns, with JXL library. Here is my code :

WorkbookSettings wbSettings = new WorkbookSettings();
wbSettings.setDrawingsDisabled(false);

File xlsFile = new File(fileName);
WritableWorkbook workbook = Workbook.createWorkbook(xlsFile, wbSettings);
WritableSheet sheet = workbook.createSheet("0First Sheet", 0);

sheet.setColumnView(0, 40);
sheet.setRowView(0, 40);

workbook.write();
workbook.close();

Here is the result : Column width has changed, but not the row height. I tried multiples way, row height never changed. enter image description here


Solution

  • OK now this is working, I simply added some random content to the file

    sheet.addCell(new Label(0, 3, "BB"));
    

    Apparently changing height of rows cant be done on an empty table...