Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Loadin ADD-IN programarically

I am starting Excel using Office interop from C# code in ASP.NET web
application. I also have Excel spreadsheet which using some 3rd party addin
library doing calculation and outputing the result to spreadsheet. I need to
open spreadsheet, pass data in input range, calculate and read data back from
output range. I can do everything, expect loading 3rd party library. As
Excel load I need it to be able to load all addins and libraries as it do
during interactive load.
Please advise
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Loadin ADD-IN programarically

Ernest,

I'm not sure about doing it from c#, but this is what you would need in vba
to load an addin.

Dim aiTemp as AddIn
Dim strAddinName as string
Dim strAddInPath as string
strAddInName = "MyAddin"
strAddInPath = "c:\temp\MyAddin.xla"
If ActiveSheet Is Nothing Then Workbooks.Add
On Error Resume Next
Set aiTemp = Application.AddIns(strAddInName)
On Error Goto 0
If aiTemp Is Nothing Then Application.AddIns.Add (strAddInPath)
Application.AddIns(strAddInName).Installed = True

Robin Hammond
www.enhanceddatasystems.com

"Ernest" wrote in message
...
I am starting Excel using Office interop from C# code in ASP.NET web
application. I also have Excel spreadsheet which using some 3rd party
addin
library doing calculation and outputing the result to spreadsheet. I need
to
open spreadsheet, pass data in input range, calculate and read data back
from
output range. I can do everything, expect loading 3rd party library. As
Excel load I need it to be able to load all addins and libraries as it do
during interactive load.
Please advise



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loadin an excel file containing macros ,Menu is disappeared TAREK MAHMOUD Setting up and Configuration of Excel 1 January 13th 10 08:32 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"