I am trying to open (actually) an excel file. I am opening an application, but I want to use Using () functionality around each of the books that I open. Why does this lead to an error?
using (Excel.Workbook wbXL = appXL.Workbooks.Open(_sourceFullPath, Type.Missing, Excel.XlFileAccess.xlReadOnly)) {
uses a red underline and says "Microsoft.Office.Interop.excel.Workbook": The type used in the using statement must be implicitly convertible to "System.IDisposable".
How to do it?
c # excel interop using
Brad
source share