how to set the number of rows in worksheet book using jxl.jar in jsp


As I have to show 97,000 rows in excel sheet, have created an excel file with data using jxl.jar file in jsp page  but when downloading this file, am getting the following error: The maximum number of rows permitted on a worksheet been exceeded.

Kindly advice me to solve this issue.
Who is Participating?
ghoshsaikat83Connect With a Mentor Commented:
To check the default save version go to Office Buttion (the one in the top left corner of excel) > Excel Options> Save and then see what version is selected in the 'Save files in this format' drop down list. Turn it to Excel Workbook (*.xlsx) if not already selected.

You have to use Excel 2007
czutshiAuthor Commented:
Yes. I have installed Excel 2007 but still getting the same error when downloading the excel file .
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

What is the default save version....
czutshiAuthor Commented:
Sorry. I dont know to check it.

Better tell me, how to check the default save version?
czutshiAuthor Commented:
FYI. Have pasted the download coding here:

String filepath = request.getParameter("filepath");

File myfile = new File(filepath);
if (myfile.exists() && myfile.canRead())
String filename = myfile.getName();

int l = myfile.getName().lastIndexOf(".");

if (l >= 0){
    String ext = myfile.getName().substring(l).toLowerCase();
    if (ext.equals(".jpg")||ext.equals(".jpeg")||ext.equals(".jpe"))
    else if (ext.equals(".gif")) response.setContentType("image/gif");
    else if (ext.equals(".pdf")) response.setContentType("application/pdf");
    else if (ext.equals(".htm")||ext.equals(".html")||ext.equals(".shtml")) response.setContentType("text/html");
    else if (ext.equals(".avi")) response.setContentType("video/x-msvideo");
    else if (ext.equals(".mov")||ext.equals(".qt")) response.setContentType("video/quicktime");
    else if (ext.equals(".mpg")||ext.equals(".mpeg")||ext.equals(".mpe"))
    else if (ext.equals(".zip")) response.setContentType("application/zip");
    else if (ext.equals(".tiff")||ext.equals(".tif")) response.setContentType("image/tiff");
    else if (ext.equals(".rtf")) response.setContentType("application/rtf");
    else if (ext.equals(".mid")||ext.equals(".midi")) response.setContentType("audio/x-midi");
    else if (ext.equals(".xl")||ext.equals(".xls")||ext.equals(".csv")||ext.equals(".xlv")||ext.equals(".xla")
    else if (ext.equals(".doc")||ext.equals(".dot")) response.setContentType("application/msword");
    else if (ext.equals(".png")) response.setContentType("image/png");
    else if (ext.equals(".xml")) response.setContentType("text/xml");
    else if (ext.equals(".svg")) response.setContentType("image/svg+xml");
      else if (ext.equals(".dwg")) response.setContentType("application/dwg");
    else response.setContentType("text/html");
      if(ext.equals(".gif") || ext.equals(".jpe") ||ext.equals(".jpg")||ext.equals(".jpeg"))
      response.setHeader ("Content-disposition", "attachment;filename=\""+myfile.getName()+"\"");
       response.setContentLength((int) myfile.length());
       BufferedInputStream fileInputStream = new BufferedInputStream(new FileInputStream(myfile));
       int i;
       while ((i = != -1) out.write(i);
<script language ="javascript">
czutshiAuthor Commented:
Here is the coding for creating a excel file based on my requirement

String filename="Project.xls";
            File newfile=new File(filepath);
            WritableWorkbook workbook = Workbook.createWorkbook(newfile);
            WritableSheet sheet = workbook.createSheet("First Sheet",0); // sheet name
            String columnname1[]={"Label","Project","Project Descr","Cpnyid ","PO Nbr","Project Mgr","Customer","Allocation Method","Rate Table ID","Gl Sub Account"};
            String columnname2[]={"Label","Task","Task Description"};

            WritableFont writlefontcolor = new WritableFont(WritableFont.ARIAL);
            WritableCellFormat cellformatdataBlue = new WritableCellFormat(writlefontcolor);      
czutshiAuthor Commented:
Excel Workbook has been set in the drop down list of 'Save files in this format' in MS Excel2007.
please advcie.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.