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?
Well,
I narrowed the issue down. What is happening is the user is exporting to excel the first time. They are leaving Excel open with the default workbook name. When they try to export a 2nd time they get an error thrown from mscorlib that the file is in use which would be correct. At that point if they attempt to export again you will get the error thrown from the excel exporter that an operation is currently in progress. Even if you close all excel workbooks the excelexporter is in a state where it thinks it is still exporting.
Is there a way to reset the excelExporter?
Hi Roger,
This sounds like a bug in the exporter to me. My first recommendation is that you try getting the latest service release. The issue is most likely already fixed.
How to get the latest service release - Infragistics Community
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
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.