p2kpradeep
New member
- Joined
- Nov 10, 2010
- Messages
- 1
- Programming Experience
- 3-5
Hi,
I have a VB .Net windows application that generates reports in excel files from a dataset.
I use "New Excel.Application" to create the application, delete all but one worksheet to begin with, and push data from my dataset in a loop. During this process, I do not show the Excel GUI to the user, so nobody can tamper with the instance. The application works without any errors.
Except in one case: When the automation is in progress, if the user opens some other excel file, it opens as a workbook within the Excel instance being used for automation, instead of creating a new Excel application. In such cases, the automation is exposed, and fails with random exceptions.
So when the automation is in progress, I would like to prevent the user from opening the instance of Excel that I use in my VB application.
What is best solution for this?
I have a VB .Net windows application that generates reports in excel files from a dataset.
I use "New Excel.Application" to create the application, delete all but one worksheet to begin with, and push data from my dataset in a loop. During this process, I do not show the Excel GUI to the user, so nobody can tamper with the instance. The application works without any errors.
Except in one case: When the automation is in progress, if the user opens some other excel file, it opens as a workbook within the Excel instance being used for automation, instead of creating a new Excel application. In such cases, the automation is exposed, and fails with random exceptions.
So when the automation is in progress, I would like to prevent the user from opening the instance of Excel that I use in my VB application.
What is best solution for this?