JAVA+POI API Excel- Need to increase width of the column

Viewed 67170

I want to increase the width of the column of excel sheet. as the i am writing trough code is long. and I need to drag the column manually to see the full text.

I did this –

HSSFRow dataRow = sampleDataSheet.createRow(0);

HSSFCellStyle cellStyle = setHeaderStyle(sampleWorkbook);

cellStyle.setWrapText(true);

***sampleDataSheet.autoSizeColumn(1000000);***

But its not changing anything..

3 Answers
Related