How do I open a file that is opened in another application

前端 未结 4 1217
广开言路
广开言路 2020-12-09 09:15

I have an winforms application that loads in excel files for analysis. Currently, in order to open the excel file the file must not be already open in excel otherwise a File

4条回答
  •  鱼传尺愫
    2020-12-09 09:55

    Try making a copy of the already opened file, read it and discard it. In order to check if the file is already opened, try reading and handle the exception by doing the copy, read, discard.

提交回复
热议问题