I am try to create a big excel 2010 with 30 columns and 1 million records with Apache poi latest. I am creating as describe in this link http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java . but I want column width to be same as column header text size. but when I am doing this after creating excel with following code
for (int x = 0; x < sheet.getRow(0).getPhysicalNumberOfCells(); x++) {
sheet.setColumnWidth(x, 20*256);
}
it is taking a huge time and even with 5gb heap size I am getting out of memory.
thanks
ram