What have been done:
- Fixed the bug in Excel writing.
- Created the page to handle the request “import-new-specials” from Excel spreadsheet to MongoDB.
Problems encountered:
- Opening output stream of Excel file without closing it input stream will empty the file content.
Solution:
- The correct sequence of updating Excel file is:
- Open the input stream and read the rows
- Close input stream
- Update the rows
- Open the output stream
- Write the rows to the file via output stream