Excel columns expand using poi

Excel columns expand using poi

Excel header or column expand poi:

As we know that we can able to create the excel sheet using apache poi in java. When you are creating the excel file it may required to expand the column size to fit the content.

In this case you need to use,

Here 0 is the index of the column.

index 0 means first column 1 means second column etc…

sheet.autoSizeColumn(0); must be used once the content written to the excel file.



1,506 total views, 4 views today

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.