Hi i have an App where one of the jobs will be convert an Excel and pass all the records to the DB.
So this takes a little time because it's more than 7000 rows that i will get and insert into the DB.
So because this job takes a little time, more than 3 minutes, I'd like to use a ProgressBar to report progress of this job.
So if i am doing this Job in Class that i have created, how can i use the backgroundWorker to report the progress to the progessBar in my case?
My objective is be accurate in the percentage of how the progress is going, and how i can use all this stuff to report the progress. I have never worked with backgroundWorkers.
I think, and this is only a tip, maybe good or not, that i first get the number of rows in the excel, make that number as some Maxvalue in the ProgressBar, and then for each Row or in an interval i report the progress.
This is possible? How can i do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…