I found the problem, there is not issue with XL file generation, but downloading file giving problem. I am using following content type in the
jsp file
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment;filename=\""+filename+"\"");