I am trying to export an grid using the Excel Exporter. The first time works just fine but after that I get the following error:
An export operation is currently in progress. A new export operation cannot begin until the current operation completes.
The title of the error is Infragistics4.Win.UltraWinGrid.ExcelExport.v11.2
This is only occurring at one particular customers site. I cannot reproduce in my office.
Does anyone have any ideas?
Had the same problem on 17.2 when the thread was aborted (user pressed cancel).
Solution was to:
- On every Excel export create a new excel exporter object.
- Probably superfluous but add a finally to remove all event handlers added to the old excel exporter.
Could not get it broken again. Solely removing event handlers in a finally was not sufficient. Re-instantiating the Excel export was absolutely necessary in this use case.
If you have the latest service release and you are still getting an erroneous message that an export is still in progress than there must be something else going on in your code that is different from the original bug we fixed.
Can you reproduce this behavior in a small sample project and post it here so we can check it out?
Hello Mike,
I'm using Version 16.2 and facing still this problem.
I get an exception due to the workSheetName is > 31 characters (assigning the name in BeginExport-event). After starting Export again, I get the exception "export operation is currently in progress".
Off course I can check the name length, but I wonder how generally catch excpetions and do error handling to cancel the process in such cases.
How I can cancel the process if exceptions occured?
If I close my form where execelExporter is placed on, I can execute Export again. I have tried to create the excel-exporter component from code, but no success.
Do you have a solution for this problem now?
Best regards
Markus
Roger,
Thanks for your reply. We are using an older version.
So I used a workaround and added datetime stamp to the file name being exported.
Regards,
Monica
They have fixed it in the following service releases. I am on an older version so I had to write a workaround but if you are using one of the releases mentioned below you should be able to install SR and have fix.
Issue "134236: The exporting process raises "System.InvalidOperationException" exception." has been addressed in service release versions 2013.1, WinForms_12.2.20122.2052, WinForms_12.1.20121.2118.