Problem with Excel File Open

Hello All,

I have developed a excel report which first saves the data into excel file(.csv) using output to value(filename) and open the same file using the following command chExcelApplication:Workbooks:OpenText. when I run the report the excel is opening and I ll come out of the program without closing the exce file. If I run the same thing next time (with same file name and same path) it is giving error "Unable to open the file" because the file is already open. Now I want to check whether the specified file is in open status or not before exporting the data into file. I have tried with file-info commands but it is not working. Please help me.

Iam releasing all objects at the end of program.

Thanks
 

parul

Member
I think there is no straight forward way of doing this.

But you can try windows API (kernel32.dll).

Have a look at Knowledge base ID P102627.

-Parul.
 
Top