How to read open excel file at C#

前端 未结 6 2123
北海茫月
北海茫月 2020-12-17 16:47

I want to read already open excel file with C#. I am using this method but it can\'t read the excel file while the file is open in Microsoft excel.

FileStre         


        
6条回答
  •  一个人的身影
    2020-12-17 17:37

    You could use the Interop library to use the already opened instance of Excel.

    oExcel == (Excel.Application) System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application")
    

提交回复
热议问题