• 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

storing xls file in database using spring mvc

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, I am very new to spring framework and storing xls file in database.I just want to store the xls file in database and later wants to edit the records stored in database. Please give me Code or suggest me how can I do this. Please give me the schema of database table as well. Please help me friends and thanks in advance.
 
Ranch Hand
Posts: 146
2
Mac Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to The Ranch Srikant. Do you want to store the .xls file in the database or do you want to import the table's data into the database?

If the former you can convert the file to a byte array and store that as a binary object. However, you would be better storing the file in the filesystem and saving details of the path to that file in the database. If the latter then I would suggest converting the file to a .csv file (OpenCSV is a library that might be helpful), process the file into entities that map to your database schema and then persisting those entities. You will have to decide on the schema, but as a starting point you might begin with copying the structure of the Excel file.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic