1

In older versions of Visual Studio, writing VB code to access Microsoft Excel files required the namespace Microsoft.Office.Interop.Excel. However, I can't find this namespace in the new version (15.8.7) of Visual Studio.

What code do I need to access Excel?

Thanks in advance.

E. Arenson
  • 23
  • 3
  • 2
    Nothing has changed. You can only use members of a namespace if you have referenced a library that contains members of that namespace. Regardless of the VS version, you have to reference the Excel object library in order to use members of the specified namespace. – jmcilhinney Oct 18 '18 at 14:06
  • https://stackoverflow.com/a/21018418/17034 – Hans Passant Oct 18 '18 at 15:06
  • Thanks, @jmcilhinney, for your reply. I've been looking for this DLL file, but I haven't had any luck. Do you know how where I should look to get it? Thanks, – E. Arenson Oct 18 '18 at 15:40
  • I found it buried in the depths of Visual Studio: [see this MSDN webpage](https://social.msdn.microsoft.com/Forums/en-US/10d02d87-b3fa-4e9c-93ac-735446cedabb/where-is-microsoftofficeinteropexcel-dll-for-visual-studio-2017?forum=vsto) – E. Arenson Oct 18 '18 at 16:11
  • It's exactly where it has always been. Interestingly, I've installed Office 365 from the Microsoft Store and I don't see that library available. Presumably you can/must use Office PIAs with Office apps from the Store. – jmcilhinney Oct 18 '18 at 22:44

0 Answers0