.NET : 내 .NET가 사무실을 자동화하는 경우 고객이 사무실을 설치해야합니까?

StackOverflow https://stackoverflow.com/questions/403118

  •  03-07-2019
  •  | 
  •  

문제

영역을 벗어난 작은 방법으로 Excel Automation을 사용하는 프로그램을 작성하면 다음과 같습니다.

Excel이 필요할 때 응용 프로그램이 실패합니까?

아니면 응용 프로그램이 시작되지 않습니까?


업데이트

같은 질문을하겠습니다.

응용 프로그램은 사용할 수 있습니까?

  • Excel이 필요한 기능을 사용하지 않는 사용자의 99.9%

  • Excel이 설치되지 않았기 때문에 사용자의 0%가 있습니다.

다른 방법으로 같은 질문을하겠습니다.

응용 프로그램이 COM Interop DLL을 참조하는 것을 초기화하지 못합니까?


다른 방법으로 같은 질문을하겠습니다.

Excel을 사용하지 않는 응용 프로그램이 있지만 COM Interop DLL이 시작되지 않습니까?


다른 방법으로 같은 질문을하겠습니다.

Excel을 설치하지 않으면 Excel을 사용하지 않는 응용 프로그램이 사용할 수 있습니까? 해당 애플리케이션이 사무실 기본 interop DLL에 의존하는 경우?


다른 방법으로 같은 질문을하겠습니다.

내 응용 프로그램이 Excel을 사용하지 않으면 사용자가 Excel을 설치해야합니까?

도움이 되었습니까?

해결책

The code will properly execute until it tries to make a call to the automation libraries, at that time it will generate an exception.

다른 팁

I have an app that uses Excel automation and I can definitively say that it will fail at runtime, not at load time. In fact we check to see if it's even installed and only show the "Show data in Excel" button if we find it (but the PIAs are deployed to all installs).

If you automate Office... you gotta have Office!

Having said that, the answer changes if you twist the question into: Can I create an Excel spreadsheet without having Excel on the client?

There are many third-party controls to do this; you can write directly to the MS SpreadML XML spec (http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx; or use third-party libraries that do (like http://www.carlosag.net/Tools/ExcelXmlWriter/).

I think it will fail at runtime, because the Interop Assemblies should be able to load without the COM-Components available on the clients system.

UPDATE: Runtime should mean when you need it!

Using COM in Win32, it will fail when needed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top