Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: JExcelAPI Warning: Validation list exceeds maximum number of characters - truncating

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JExcelAPI Warning: Validation list exceeds maximum number of characters - truncating

    Hi,
    I am working on a legacy application where Java 1.4 and JExcel API 2.6.9 (Java 1.4) are being used.
    I have to create an xls file which will have a dropdown list. This list will contain data from database.
    I am able to create the list but this list is not containing all the values from database.
    It is taking some values and truncating the rest.
    One warning message is coming: - "Warning: Validation list exceeds maximum number of characters - truncating"

    Is there any way to avoid this?
    Kindly let me know.

    My sample code is below: -
    <%
    try {
    //response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8");
    response.setContentType("application/vnd.ms-excel;charset=UTF-8");
    response.setHeader("Expires:","0");
    response.setHeader("Content-Disposition","attachment; filename=UserTemplate.xls");

    OutputStream os = response.getOutputStream();
    WritableWorkbook workbook = Workbook.createWorkbook(os);
    WritableSheet wSheet = workbook.createSheet("users", 0);


    WritableCellFeatures cellFeatures = new WritableCellFeatures();
    ArrayList al = new ArrayList();
    for(int i=0;i<39;i++){
    al.add("value"+i);
    }
    cellFeatures.setDataValidationList(al);
    Label checkLabel = new Label(0,0,(String)al.get(0));
    checkLabel.setCellFeatures(cellFeatures);
    wSheet.addCell(checkLabel);

    workbook.write();
    workbook.close();

    } catch (Exception e) {
    e.printStackTrace();
    }
    %>


    Thanks in advance


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: JExcelAPI Warning: Validation list exceeds maximum number of characters - truncating


  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JExcelAPI Warning: Validation list exceeds maximum number of characters - truncating

    I apologize for that.

    Actually I need to know the solution in urgent basis. All of my data should show and nothing should truncate.


    Kindly help.......

    Thanks in advance.......

Similar Threads

  1. Reading characters from a simple output to list words.
    By adwodon in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: July 16th, 2012, 03:34 PM
  2. The nth highest number from a list
    By sbjibo in forum What's Wrong With My Code?
    Replies: 6
    Last Post: April 30th, 2012, 11:20 AM
  3. JExcelAPI Error
    By esplanade56 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 18th, 2011, 07:48 AM
  4. JExcelAPI
    By esplanade56 in forum Java Theory & Questions
    Replies: 5
    Last Post: July 8th, 2011, 07:53 AM
  5. HELP! Server side validation for phone number
    By LexenZ in forum JavaServer Pages: JSP & JSTL
    Replies: 5
    Last Post: June 19th, 2011, 10:29 AM