Echo
Echo

Reputation: 3039

Write data into cell into one line

I am using jxl to export an Excel sheet. I just need to write data into a cell into just one line without shifting data to a new line into same cell.

Expected at Cell:

Hello I am just testing you.

Actual:

Hello I am 
just testing you.

My code:

   WritableCellFormat tableDataFormatDefault;

    tableDataFormatDefault = new WritableCellFormat(TABLE_DATA_FONT);
    tableDataFormatDefault.setBorder(Border.ALL, BorderLineStyle.THIN);
    tableDataFormatDefault.setWrap(true);
    tableDataFormatDefault.setAlignment(Alignment.CENTRE);
    tableDataFormatDefault.setWrap(true)

How can I fix this?

Upvotes: 2

Views: 233

Answers (1)

Darin Kolev
Darin Kolev

Reputation: 3409

tableDataFormatDefault.setWrap(false);

Upvotes: 3

Related Questions