c# windows app with progress bar
<p>I have a datagridview with data and I am exporting it to excel, which takes some time, in the mean time(export is going on) I just want to show a progress bar. How can I achieve this? I used backgroundworker and was unsuccessful, as the progressbar progress after completion of the export functionality.</p>