• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP Code to iterate Excel file

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP code which will open the contents of a excel file.
Now i need this contents of the excel file to be added dynamically to a table in the sameJSP.Please let me know how to proceed.At the maximum 10 rows can be added dynamically.
Assuming i have a table in JSP which has heading first name,last name,DOB and Gender.After opening the excel through JSP the contents needs to be iterated and added to the columns mentioned.Can some one please help me?.

 
Rancher
Posts: 43081
77
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

You would not do this in a JSP (which is purely for creating a view9; but in Java code - either a backing bean or a servlet. You can use the Apache POI library to do this. Then you would add everything the JSP page needs to a collection, which you can then iterate over on the JSP via JSTL.

Or you can use a tag library like DisplayTag to create the table (but you'd still use POI to read the file).
 
reply
    Bookmark Topic Watch Topic
  • New Topic