Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6591993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:29:49+00:00 2026-05-25T17:29:49+00:00

I have a spreadsheet that is using the WORKDAY() function in Excel (which I

  • 0

I have a spreadsheet that is using the WORKDAY() function in Excel (which I believe lives in the Analysis Toolpak library/package/whatever you call it in Excel). When I open this spreadsheet manually and call this function it behaves fine.

I have a macro that references the cell that the WORKDAY() function is used in:

Dim startDate as Date
startDate = Cells(1,1)

When I run the macro after opening the spreadsheet manually this code executes fine. The problem is when I try and open the spreadsheet and run the macro from my C# code. It will then fail when it tries to get the value for startDate. When I look at that cell I see a #VALUE! reference error. It seems like it is not loading the correct references when I open the spreadsheet from my C# code.

Does anyone know how to resolve this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:29:49+00:00Added an answer on May 25, 2026 at 5:29 pm

    What I had to do is force the loading of the .xla add-in using:

    app.Workbooks.Open(file_name)
    

    where app is an instance of Microsoft.Office.Interop.Excel.Application
    if it already open then nothing happens, otherwise it loads the analysis addin. To find the path for the add-in it depends on the version of Office

    • Office 11: C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis\ANALYS32.XLL
    • Office 12: C:\Program Files (x86)\Microsoft Office\Office12\Library\Analysis\ANALYS32.XLL
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a spreadsheet in Excel that connects to an internal DB using the
I have a C# method, see code below, that generates an Excel spreadsheet using
I have an Excel spreadsheet that uses a TFS query to pull information on
I have an Excel spreadsheet that looks like: spreadsheet http://img186.imageshack.us/img186/6495/exelf.jpg I'd like to convert
I have an Excel spreadsheet that will sit out on a network share drive.
I have an excel spreadsheet that is password-protected. I need to open this spreadsheet
Ok, so I have an excel spreadsheet that contains data that I would like
All, We have an Excel spreadsheet that uses ADOMD to query OLAP cubes and
I have an Excel spreadsheet that needs to display data from our SQL database.
I have a large spreadsheet in Excel 2007 OpenXML format that I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.