I have a web application that allows a user to upload an Excel spreadsheet to insert ~250,000 records at a time into a database. I’d like to have a progress bar that shows the user how far along the process is.
Here’s my basic plan
- Upload a spreadsheet
- Write total
ExcelRow CounttoTempTable - Loop through cells in each row to build sql and execute query (for each row)
- Client makes ajax call every 3 seconds to get
Count(*) From TempTable Group By ExcelRowID - Update progress bar until 100%
Is there a better way of doing this? Is there anything I should watch out for? Will this work?
I’m using ASP.Net 4.0, SQL Server 2008 R2 Express, EPPlus 3.0, and jQuery 1.7.1
I ended up just approximating the time and making a very elaborate progressbar to entertain the user.