Dear Members
I'm having an asp .net web application, C# is the language. Here i'm importing bulk data from an excel file having around 5000 thousand rows. While importing , there
are some validations and calculations on it, So its taking around 10 to 15 min for each import. By the time the application gets hang as well as the user being idle.
Is there any best practice to handle such a situation ? Please guide me, it would have been a great help.
Thank you all.
Sharon ThompsonPosted May 5, 2015, 4:18 AM
The manipulation of 5000 rows should be insignificantly fast, I'm talking about less than a second.
Now because you need to additionally process this data I'm afraid OLEDB will not suite you (I personally believe that would be the fastest way for importing and exporting excels files to database). However you could try out this C# library for Excel files, it's very fast as well.
Also you can find an article about how to read excel files in C# and how to import those excel files into a DataTable object.
suhesh selladuraiPosted Apr 20, 2014, 2:54 PM
suhesh selladuraiPosted Apr 20, 2014, 2:53 PM
suhesh selladuraiPosted Apr 20, 2014, 2:53 PM
Anubhav ChaudharyPosted Apr 15, 2014, 5:26 AM
You can either use Asynchronous function or you can use threading for the same.
If you are using Async then your user doesn't need to remain idle, he just needs to click once and then he can perform other things, but it will take the similar time to execute(behind the scene).
If you are using threading then your code will execute nearly 10 times faster or may be more but for this small time he needs to remain idle and needs to wait for the code to get execute.
Munesh SharmaPosted Apr 15, 2014, 2:01 AM
http://www.codeproject.com/Tips/636719/Import-MS-Excel-data-to-SQL-Server-table-using-Csh