0

I am developing a website that stores data in a mysql database. One of the user of the website wishes to record data for the website in an excel spreadsheet. I intend to develop a solution that consist of three parts:

  1. A controller class that saves the uploaded excel spreadsheet into a directory in the server.
  2. A service layer that read the saved excel spreadsheet from the directory using apache POI. 3. JPA to record data in the excel spreadsheet into the mysql database.

Is this a good pattern for the intended solution ? Has anyone implemented a similar solution ?

2
  • I dont really understand your requirements. Is the excel spreadhseet meant to be another way to get data into the database? Or is it meant to be a replacement for the database? Commented Jan 20, 2013 at 5:15
  • @Solubris the excel spreadsheet is meant to be another way to get data into the database. Thank you Commented Jan 20, 2013 at 9:46

1 Answer 1

1

Sounds reasonable.

  • See if the user would upload a csv file instead of xls file, as this will be easier to handle.
  • try to stream upload directly to disk. If you store it in memory, then large uploads will cause out of memory error for jvm.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.