I'm exporting data form my C# application to an Excel file using Office Interop. Everything works fine, but the exports can be quite large and take some time to complete. I've searched around on the web and MSDN but haven't found much on running Interop calls in a thread. Are there any reasons I shouldn't put the export to Excel functionality into a background worker thread?
So long as you're only calling into the Excel application from one thread, I don't expect that you would have any problems. I have written an application that automates Excel on a background worker thread in the same way you describe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With