This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Installing an Excel Add-In
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 14, 2007
04:55 AM
Installing an Excel Add-In
Hi all
I'm new to IS, so please bare with me!
Uding IS Express 2008, I'm creating an install for some Excel files and an Excel Add In. I've got the basic install to copy the files to the user defined directory, including the Add In.
What I want to do now is install the Add In. I don't need to make it active (the spreadsheets control the behaviour when opened), so I just need to add it to the Add In manager (navigate Tools -> Add-Ins in Excel).
I've found this thread, but have no idea what to do with the code.
Any help will be greatly appreciated.
Alex
I'm new to IS, so please bare with me!
Uding IS Express 2008, I'm creating an install for some Excel files and an Excel Add In. I've got the basic install to copy the files to the user defined directory, including the Add In.
What I want to do now is install the Add In. I don't need to make it active (the spreadsheets control the behaviour when opened), so I just need to add it to the Add In manager (navigate Tools -> Add-Ins in Excel).
I've found this thread, but have no idea what to do with the code.
Any help will be greatly appreciated.
Alex
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 14, 2007
09:09 AM
As a general suggestion, if you are using the Express edition, it would probably be better to post in the Express edition's forum. As for installing an Excel add-in, the question you will need to answer is: what needs to be done on the target machine to make Excel aware of the add-in? It may be a matter of adding a registry key, or file, to a well-known location, and if so it should be easy. It may require calling an entry point in some DLL, which may or may not be easy. I don't personally know anything about Excel add-in registration, though, so it might be something else entirely.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2007
10:03 AM
MichaelU wrote:
As a general suggestion, if you are using the Express edition, it would probably be better to post in the Express edition's forum.
I did, but had no replies.
MichaelU wrote:
As for installing an Excel add-in, the question you will need to answer is: what needs to be done on the target machine to make Excel aware of the add-in? It may be a matter of adding a registry key, or file, to a well-known location, and if so it should be easy. It may require calling an entry point in some DLL, which may or may not be easy. I don't personally know anything about Excel add-in registration, though, so it might be something else entirely.
I'll see what's needed. Thanks for the reply.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2007
10:15 AM
According to this Microsoft article, I can use the following script:
Where would I use this in IS?
Thanks
Alex
Dim oXL As Object, oAddin As Object
Set oXL = CreateObject("Excel.Application")
oXL.Workbooks.Add
Set oAddin = oXL.AddIns.Add("C:\test.xla", True)
oAddin.Installed = True
oXL.Quit
Set oXL = Nothing
Where would I use this in IS?
Thanks
Alex
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2007
10:32 AM
Which Type of Add-in you want to add in Excel Com Add-in or XLA Add-in?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2007
11:56 AM
It's an xla add-in.
Thanks
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2007
10:19 AM
Sounds like you need to call into Excel, and in order to do that you need to write a custom action. As it turns out, Windows Installer supports VB script custom actions (though there can be difficulties at runtime that e.g. a C++ DLL custom action can avoid), so you can set your installer to use this script - see the Installation Designer tab, Custom Actions view. Note that the VB runtime environment during the Install is not quite the same as that for cscript, so some small tweaks may be required.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 23, 2008
12:31 PM
It seems that a lot of people don't use this technique, but you can translate the VB code to Install Shield script code. I quickly translated the code. So this is UNTESTED code, but the code looks good. I also have put in more checks than the original snip-it of code posted earlier. Let me know if this works. I'm thinking of using it myself.
prototype InstallExcelAddIn(BYVAL STRING);
function InstallExcelAddIn(strFileName)
OBJECT oXL;
OBJECT oAddin;
BOOL bResult;
begin
bResult = FALSE;
if Is(strFileName, FILE_EXISTS) then
///////////////////////////////////////////////////////////////////////
// Get Excel Object
///////////////////////////////////////////////////////////////////////
Set oXL = CreateObject("Excel.Application");
if IsObject( oXL ) then
oXL.Workbooks.Add();
Set oAddin = oXL.AddIns.Add(strFileName, TRUE);
if IsObject(oAddin) then
try
oAddin.Installed = TRUE;
bResult = TRUE;
catch
endcatch;
endif;
oXL.Quit();
///////////////////////////////////////////////////////////////////////
// Free up resources... //
///////////////////////////////////////////////////////////////////////
try
oAddin = NOTHING;
catch
endcatch;
try
oXL = NOTHING;
catch
endcatch;
endif;
endif;
return bResult;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 23, 2008
01:15 PM
In my search on Add-Ins, I found this piece of code. It looks like the function I wrote will work.