How to use redistributable PIA 2010 to create excel application on machine which doesn't have MS Office client installed - excel

From last couple of days I'm struggling with redistributable PIA 2010. Actually I have created one excel application locally, which uses 2007 PIA (I have also MS Office installed on my machine). This application was working fine, now I have installed the 2010 PIA and register it's Microsoft.Office.Interop.Excel dll then I have deleted then added this new dll in my earlier created excel application, but now application crashes on creation of excel object. i.e.
var app = new Application();
and below error is showing on browser.
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Excel.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
Now, could anyone tell me what exactly wrong am I doing? Is this is the right approach to create excel application using only redistributable PIA 2010. If not, please help me out what is the correct approach to resolve this.

Redistributable PIAs are just a "complement" required by VS 2008 and older. The given MS Office version has to be installed on the target computer anyway. If you created an application relying on the Microsoft Excel Object of Office 2010 (version 14.0), it would only work on computers where Office 2010 is installed. If, on top of that, you built it by using VS 2008 or older, you would have also to install the corresponding PIA package.

Related

Is it actually possible to create SSIS packages in a 64-bit environment that use Excel 2007 sources and destinations?

Windows 10 Pro 64-bit (Version 1903)
Sql Server 2019.
VS 2010.
MS Office 2016 64-bit.
Moving a legacy SSIS package from an older 64-bit environment.
Unable to create an Excel Source or Destination in VS. When attempting Excel 2007, then VS complains that ACE.OLEDB is not registered. When attempting Excel 97, VS complains about JET. The messages have not changed either before or after installing Access Database Engine end Microsoft Access Runtime 2010. Beginning to wonder if this is supported at all.

VB6 Outlook Add-in works in Outlook 2013 but only if full Office is installed?

I have a VB6 Outlook add-in. This is tested and working on a Windows 7 64bit machine, with 32bit OFFICE installed.
On another PC, Windows 7 64bit, 32bit OUTLOOK install, the add-in does not load. It is not listed in the list of COM add-ins, and when I try to add it to that list manually, it does not appear!
I assume that there is some dependancy with some office DLLs causing the issue but I don't know how to troubleshoot to find out where the issue lies.
Can anyone give me any tips??
Thanks in advance!
I got exactly the same problem until I realized the problem was coming from C:\Program Files (x86)\Common Files\DESIGNER\MSADDNDR.DLL, that is brought by Office 2013 Pro with a file modified in 2010, and not with the family version. Check out http://blogs.msdn.com/b/vsod/archive/2012/11/21/vb6-based-add-ins-may-fail-to-work-on-office-2013.aspx and http://support.microsoft.com/kb/2792179 that mention this issue. Another important thing to note that that the Family edition looks to be a ClickToRun version (simili AppV virtualized application and Professional version is a fully installed version).

Register COM Interop dll using InstallShield

I am trying to register COM Interop dlls using Installshield from last 10 days but still found no luck. Here's the issue:
I have an Installscript project with some ActiveX controls and dlls. Now I want to replace some ActiveX with .NET com Interop dlls created on VS2010 using C#.net. I am registering those
com Interop dlls using batch file.
So the Issue is , If VS2010 is installed on the client machine then application works properly but If .NET Framework is Installed on the client machine instead of VS2010 , dlls get registered but application doesn't work and throws an error "Make sure the Object is entered in the system registry".
Any idea on what I am doing wrong? Any help will be appreciated.
Thanks in advance.

VSTO 2010 excel addins cannot be loaded on target xp machine

I published my excel addins with clickonce on vs2010.
It`s prerequisites contains .net framework 4 client,vsto 2010 and installer3.5.
Deploying it on win7 works well,when I deploy it on xp,installing no error occured,
but it(com) cannot loaded when run excel app.
I tried mang mehods,only when I manually installed .net framework 2.0 or 3.0 or 3.5
my addin will appear
I donot know why.
thanks
Here's a dumb question, when deploying are your users installing the .vsto or the setup.exe (aka bootstrap). If they are installing the just the .vsto file they aren't getting any of the pre-reqs. They live in the setup.exe. Also are you installing the PIAs (or are you using the embedded PIAs which is new to 2010)? Win7 machines tend to have the right pre-reqs but when you go back in time on XP they don't.

Excel UDF formula does not appear

I have an Excel UDF . It is written in C# and the automation addon has been packaged using the Visual Studio setu up project wizard. The addon loads in the list of automation addons available but the formula does not appear in the Insert function formula dialogue box.
I used Office 2003 and Visual Studio 2008 to build the addin. The client machine has .Net Framework 2.0 installed and does not have any installation of VS.
Should I have to enable the udf specifically somewhere ? This problem appears only when I am packaging the addon to distribute it to a client machine.
Thanks,
The fact that the COM add-in appears in the availale list of automation add-ins would imply that the COM add-in has been successfully registered on the target machine.
Could it be a Trust issue? You can check the level of trust your assembly has using the Microsoft .NET Framework Configuration: http://support.microsoft.com/kb/815147
I suspect you'll need full-trust.
I haven't built add-ins with COM for a while (I can list the alternatives if you like), so let me know if this doesn't fix it and I'll look into it further.

Resources