Отсутствует ссылка на сборку microsoft office interop excel

0 / 0 / 0

Регистрация: 26.11.2016

Сообщений: 15

1

02.12.2016, 21:32. Показов 38821. Ответов 8


Студворк — интернет-сервис помощи студентам

Добрый день!

Просьба подсказать, как добавить Microsoft.Office.Interop.Excel в Visual Studio 2015.

Спасибо.



0



213 / 209 / 146

Регистрация: 20.11.2014

Сообщений: 1,161

02.12.2016, 22:07

2



0



71 / 68 / 46

Регистрация: 02.12.2015

Сообщений: 890

Записей в блоге: 1

02.12.2016, 22:21

3

У меня поэтому пути расположен dll: C:WindowsassemblyGAC_MSILMicrosoft.Office.Inte rop.Excel15.0.0.0__71e9bce111e9429c



1



906 / 663 / 318

Регистрация: 23.10.2016

Сообщений: 1,540

02.12.2016, 22:38

4

В обозревателе решений ПКМ по «ссылки» -> Добавить ссылку -> Сборка -> Расширения -> Microsoft.Office.Interop.Excel



1



0 / 0 / 0

Регистрация: 26.11.2016

Сообщений: 15

03.12.2016, 00:50

 [ТС]

5

У меня нет такого в обозревателе решений в «ссылках».

Добавлено через 15 минут
Разобрался. Спасибо!



0



0 / 0 / 0

Регистрация: 05.12.2018

Сообщений: 1

10.07.2020, 14:00

6

Ну раз разобрался, то сообщил бы как?



0



chumich

2079 / 1232 / 464

Регистрация: 20.12.2014

Сообщений: 3,237

10.07.2020, 19:20

7

Цитата
Сообщение от TilmatPirat
Посмотреть сообщение

сообщил бы как?

В меню студии: Сборка -> Добавить ссылку.
В открывшемся Менеджере ссылок: СОМ -> Библиотеки типов -> Microsoft Exxcel 12.0 Object Library (у вас может быть 13.0,14.0,15.0 и т. д. — в зависимости от вашего пакета офиса) — поставить галочку.
И далее в коде добавить соответствующий using. Например, так, чтобы не писать в коде Microsoft.Office.Interop.Excel перед каждым объектом:

C#
1
using Excel = Microsoft.Office.Interop.Excel;



5



0 / 0 / 0

Регистрация: 12.07.2021

Сообщений: 58

29.12.2021, 20:02

8

Цитата
Сообщение от chumich
Посмотреть сообщение

В меню студии: Сборка -> Добавить ссылку.

У меня находится в меню студии: Проект-> Добавить ссылку. А дальше уже как описано выше.
Пришлось поискать, так что может пригодится кому



0



Фрилансер

761 / 458 / 146

Регистрация: 06.01.2017

Сообщений: 4,817

29.12.2021, 20:36

9

Цитата
Сообщение от nat_s
Посмотреть сообщение

У меня находится в меню студии: Проект-> Добавить ссылку. А дальше уже как описано выше.
Пришлось поискать, так что может пригодится кому

в большинстве случаев Microsoft.Office.Interop не нужен)
так что вряд-ли)



0



I am having troubles adding the excel reference to my project. I have already installed Primary Interop Assemblies.

The project is detecting the Microsoft.Office.Interop.Word assembly reference correctly but the excel reference still cannot be found.

When I try to manually add the reference, I right click the project, add reference, navigate to the Microsoft.Office.Interop.Excel file and try to add it manually. Once i select the reference I then make sure the reference is checked, then hit ok. Nothing happens, it fails to actually add the reference path to the project.

Using VS2012 Ultimate.

Any suggestions on what I can do to get the project to see the excel reference?

41686d6564 stands w. Palestine's user avatar

asked Oct 23, 2013 at 13:38

stylex's user avatar

6

If you don’t have excel installed, run this command in the nuget-packet-manager-console:

Install-Package Microsoft.Office.Interop.Excel

answered Apr 14, 2017 at 14:51

Luca Ziegler's user avatar

Luca ZieglerLuca Ziegler

3,0981 gold badge22 silver badges39 bronze badges

I installed Microsoft office PIAs, but I had the same problem, cannot find microsoft.office.interop.excel dll, I also I installed Visual Studio 2010 Tools for the Office System 4.0 Runtime Service Pack 1 but still the problem persist.

Finally I resolve the problem with an add of Office / SharePoint development package to my Visual Studio 2017 installation:

Go to Tools > Get Tools and Features ..

And then check Office / sharepoint development and modify your installation.

answered Apr 4, 2018 at 15:03

Mohammed EL KALAKHI's user avatar

1

I installed MS Office 13 and from then on I started getting this error in VS 2012 project.
I tried adding the MS Office lib via COM control but that didnt work.
Finally I had to add this library references from the «Extensions» section (not not under COM); had to select Microsoft.Office.Interop.Excel, version 15.0.0.0. That fixed the error.

Hope that helps some.

answered Apr 11, 2016 at 19:16

Yoda's user avatar

У меня возникают проблемы с добавлением ссылки excel на мой проект. Я уже установил Primary Interop Assemblies.

Проект определяет правильность ссылки на сборку Microsoft.Office.Interop.Word, но ссылка на excel все еще не найдена.

Когда я пытаюсь вручную добавить ссылку, я прямо щелкните проект, добавьте ссылку, перейдите в файл Microsoft.Office.Interop.Excel и попытайтесь добавить его вручную. После того, как я выберу ссылку I, убедитесь, что ссылка отмечена, а затем нажмите ok. Ничего не происходит, он фактически не добавляет ссылку на проект.

Использование VS2012 Ultimate.

Любые предложения о том, что я могу сделать, чтобы получить проект, чтобы увидеть ссылку excel?

Обновление: исправлена ​​проблема.

  • В меню «Проект» нажмите «Добавить ссылку».

  • На вкладке COM найдите библиотеку объектов Microsoft Excel и нажмите «Выбрать».

  • Нажмите «ОК» в диалоговом окне «Добавить ссылки», чтобы принять выбранные вами варианты. Если вам предлагается создать обертку для выбранных вами библиотек, нажмите «Да».

I am developing an application which will send emails using C#. The app will be able to use templates for mail, among other things. The problem is I’m having trouble finding any Office.Interop references, which means I cannot work with Outlook.

Office is installed on my computer, but I’ve also tried to install the PIA from this link http://www.microsoft.com/en-us/download/details.aspx?id=3508. Unfortunately, this didn’t change anything: When I launch the MSI it stops without a word, and I don’t know if that is part of the problem.

Kjartan's user avatar

Kjartan

18.4k15 gold badges74 silver badges93 bronze badges

asked Feb 24, 2014 at 11:23

T2o's user avatar

2

Look for them under COM when trying to add the references. You should find the reference below, and possibly Microsoft Outlook 15.0 Object Library, if you need that. There are similar libraries for Word, Excel, etc.:

enter image description here

Update: The Object Library should contain the Interop stuff. Try to add this to a source file and see if it can now find what you need:

using Microsoft.Office.Interop.Outlook;

enter image description here

answered Feb 24, 2014 at 11:30

Kjartan's user avatar

KjartanKjartan

18.4k15 gold badges74 silver badges93 bronze badges

6

I forgot to select Microsoft Office Developer Tools for installation initially. In my case Visual Studio Professional 2013 and also 2015.

enter image description here

answered Dec 4, 2014 at 2:52

Matthew Lock's user avatar

Matthew LockMatthew Lock

12.9k12 gold badges90 silver badges128 bronze badges

1

If you’re using Visual Studio 2015 and you’re encountering this problem, you can install MS Office Developer Tools for VS2015 here.

answered Jul 27, 2015 at 8:01

Phileo99's user avatar

Phileo99Phileo99

5,5312 gold badges47 silver badges54 bronze badges

1

With Visual Studio 2015 I have activated it with the following steps.

  1. Programs and Features —> Select Visual Studio > Change
  2. Choose Modify
  3. Windows and Webdevelopment —> Tick/select «Microsoft Office Developer Tools»
  4. Start Update

It should work now.

Kjartan's user avatar

Kjartan

18.4k15 gold badges74 silver badges93 bronze badges

answered Jun 16, 2016 at 8:28

LuckyLikey's user avatar

LuckyLikeyLuckyLikey

3,4541 gold badge31 silver badges53 bronze badges

You can find it at link:

C:WindowsassemblyGAC_MSILMicrosoft.Office.Interop.Word15.0.0.0__71e9bce111e9429cMicrosoft.Office.Interop.Word.dll

Browse it then add references

answered Oct 6, 2016 at 7:34

Tung Ha's user avatar

Tung HaTung Ha

1312 silver badges7 bronze badges

3

If you have installed latest Visual studio and want to
To locate library of Microsoft.Office.Interop.Outlook or any other Microsoft.Office.Interop library then you should look into below 2 folders:

C:Program Files (x86)Microsoft Visual Studio 12.0Visual Studio Tools for OfficePIAOffice14

C:Program Files (x86)Microsoft Visual Studio 12.0Visual Studio Tools for OfficePIAOffice15

Please note that folder could be C:Program Files

Manos Nikolaidis's user avatar

answered Oct 19, 2015 at 16:30

Amit's user avatar

AmitAmit

615 bronze badges

I think you need to run that .msi to install the dlls. After I ran that .msi I can go to (VS 2012) Add References > Assemblies > Extensions and all of the Microsoft.Office.Interop dlls are there.

On my computer the dlls are found in «c:Program Files(x86)Microsoft Visual Studio 12.0Visual Studio Tools for OfficePIA» so you could check in a similar/equivalent directory on yours just to make sure they’re not there?

answered Feb 24, 2014 at 11:36

John Darvill's user avatar

John DarvillJohn Darvill

1,25411 silver badges17 bronze badges

2

Just doing like @Kjartan.

Steps are as follows:

  1. Right click your C# project name in Visual Studio’s «Solution Explorer»;

  2. Then, select «add -> Reference -> COM -> Type Libraries » in order;

  3. Find the «Microsoft Office 16.0 Object Library», and add it to reference (Note: the version number may vary with the OFFICE you have installed);

  4. After doing this, you will see «Microsoft.Office.Interop.Word» under the «Reference» item in your project.

answered Dec 9, 2018 at 16:22

Chengshuang Li's user avatar

  • #1

Добавление сборки Microsoft.Office.Interop.Excel

Пошаговое руководство, с помощью которого вы сможете добавить сборку Microsoft.Office.Interop.Excel.dll, предназначенную для работы с Excel файлами, в свой проект.

1. Перейдите в окно Solution Explorer.

c-shpargalka-dlja-raboty-s-papkami-i-podpapkami_1.png

2. Найдите пункт References и нажмите на нём правую кнопку мыши.
3. В появившемся контекстном меню выберите пункт Add Reference.

kak-dobavit-sborku-microsoft-office-interop-excel_1.png

4. В окне Reference Manager выберите пункт Assemblies -> Extensions.
5. Найдите сборку Microsoft.Office.Interop.Excel, после чего выберите ее, установив рядом с ней галочку.

kak-dobavit-sborku-microsoft-office-interop-excel_2.png

6. Нажмите на кнопку с надписью «OK», чтобы добавить сборку в проект.

kak-dobavit-sborku-microsoft-office-interop-excel_3.png

7. Для удобства работы с членами и типами добавьте следующую строку:
using Microsoft.Office.Interop.Excel;
8. Если после добавления сборки или во время работы у вас возникает конфликт имен с типами или членами других сборок, то для решения данной проблемы вы можете создать псевдоним:
using Excel = Microsoft.Office.Interop.Excel;

kak-dobavit-sborku-microsoft-office-interop-excel_4.png

Понравилась статья? Поделить с друзьями:
  • Отсутствует создать документ word
  • Отступы шрифта таблицы в word
  • Отступы строк в word 2007
  • Отступы страницы в excel
  • Отступы рисунков в word