Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel - Analysis Toolpack loading problem

Hello,

I have an excel file which I address from within C#:

write data to it
execute a macro in it (using cells which use the YearFrac function from the
add-in "Analysis Toolpack")
read back the results.

After exporting data to the excel the add-in "Analysis Toolpack" seems to
have problems:

All cells using this function (example: = YearFrac(A1, B1, 2) where cells A1
and B1 contain dates) contain the value #Name?

direction to the solution?
After unchecking and checking the add-in (under Tools = Add-Ins...), I
suddenly get an additional menu option Tools = Data Analysis... (which was
missing before)

Then I click this menu option Data Analysis.. and from the moment the popup
on this opens I see the cells with formulas using YearFrac, returning correct
results. (I then close this popup Data Analysis.. and all is solved, until I
write my data in the excel file again)

Laura G.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Excel - Analysis Toolpack loading problem

When starting Excel via automation, which I imagine is what you are doing,
add-ins are not automatically loaded.
Hence any function in such add-ins are not known to Excel.

Load the addin in your code.

NickHK

"Laura G." <Laura wrote in message
...
Hello,

I have an excel file which I address from within C#:

write data to it
execute a macro in it (using cells which use the YearFrac function from

the
add-in "Analysis Toolpack")
read back the results.

After exporting data to the excel the add-in "Analysis Toolpack" seems to
have problems:

All cells using this function (example: = YearFrac(A1, B1, 2) where cells

A1
and B1 contain dates) contain the value #Name?

direction to the solution?
After unchecking and checking the add-in (under Tools = Add-Ins...), I
suddenly get an additional menu option Tools = Data Analysis... (which

was
missing before)

Then I click this menu option Data Analysis.. and from the moment the

popup
on this opens I see the cells with formulas using YearFrac, returning

correct
results. (I then close this popup Data Analysis.. and all is solved, until

I
write my data in the excel file again)

Laura G.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel - Analysis Toolpack loading problem

This works

Thanks :-)

Laura G.

"NickHK" wrote:

When starting Excel via automation, which I imagine is what you are doing,
add-ins are not automatically loaded.
Hence any function in such add-ins are not known to Excel.

Load the addin in your code.

NickHK

"Laura G." <Laura wrote in message
...
Hello,

I have an excel file which I address from within C#:

write data to it
execute a macro in it (using cells which use the YearFrac function from

the
add-in "Analysis Toolpack")
read back the results.

After exporting data to the excel the add-in "Analysis Toolpack" seems to
have problems:

All cells using this function (example: = YearFrac(A1, B1, 2) where cells

A1
and B1 contain dates) contain the value #Name?

direction to the solution?
After unchecking and checking the add-in (under Tools = Add-Ins...), I
suddenly get an additional menu option Tools = Data Analysis... (which

was
missing before)

Then I click this menu option Data Analysis.. and from the moment the

popup
on this opens I see the cells with formulas using YearFrac, returning

correct
results. (I then close this popup Data Analysis.. and all is solved, until

I
write my data in the excel file again)

Laura G.




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
Difficulty Loading Analysis Toolpack in 08 CDM Excel Discussion (Misc queries) 1 September 12th 08 09:04 PM
Excel 2003 analysis toolpack add-in FLYNNE Excel Discussion (Misc queries) 1 November 29th 05 04:31 PM
Analysis ToolPack For Excel 2002 Angelo F. Excel Discussion (Misc queries) 1 June 16th 05 09:23 PM
Problem using analysis toolpack when automatically running excel Dave Gruzewski Excel Programming 1 February 14th 05 06:39 PM
Problem using analysis toolpack when automating EXCEL Dave Gruzewski Excel Programming 1 February 14th 05 06:37 PM


All times are GMT +1. The time now is 11:28 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"