ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   COMException raised on opening excel file in thread (https://www.excelbanter.com/excel-programming/407150-comexception-raised-opening-excel-file-thread.html)

Ajaz

COMException raised on opening excel file in thread
 
Hi all,

I am trying to import excel file into datagridview from a thread. on runt
time i am getting below error. The same code is running perfectly if not run
in thread

"A first chance exception of type
'System.Runtime.InteropServices.COMException' occurred in test.exe"

Note: i have taken care for add row in datagridview control by uisng
invokereq and callback concept. though i have not done anything for excel
operations like this.

Can anyone help me on this. Maybe i am missing something here.


Thanks
Ajaz


All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com