Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. User defined functions for Excel 2010 in .NET: args linked to cells don't work

User defined functions for Excel 2010 in .NET: args linked to cells don't work

Scheduled Pinned Locked Moved C#
helpquestioncsharpcom
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PozzaVecia
    wrote on last edited by
    #1

    I have Windows 7 64-bit and Excel 2010 32bit I have the following question: I created an user defined functions for Excel in .NET according to the code http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx[^] I'm using now MultiplyNTimes in my Excel 2010 spreadsheet. if in the cell A1 i type =MultiplyNTimes(2,3,4) i get the correct results (162) if in the cell A1 i type =MultiplyNTimes(B2,3,4) and I type 2 in cell B2, then I get #VALUE! Basically my UDF can't accept a link to a cell as argument... can this bug be connected with 64 bit of Windows? (note thae using the same OS with in 2007 works fine!) not sure I'm clear. Have you any suggestion to fix this bug? Thanks for your time

    D 1 Reply Last reply
    0
    • P PozzaVecia

      I have Windows 7 64-bit and Excel 2010 32bit I have the following question: I created an user defined functions for Excel in .NET according to the code http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx[^] I'm using now MultiplyNTimes in my Excel 2010 spreadsheet. if in the cell A1 i type =MultiplyNTimes(2,3,4) i get the correct results (162) if in the cell A1 i type =MultiplyNTimes(B2,3,4) and I type 2 in cell B2, then I get #VALUE! Basically my UDF can't accept a link to a cell as argument... can this bug be connected with 64 bit of Windows? (note thae using the same OS with in 2007 works fine!) not sure I'm clear. Have you any suggestion to fix this bug? Thanks for your time

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      PozzaVecia wrote:

      Basically my UDF can't accept a link to a cell as argument... can this bug be connected with 64 bit of Windows?

      Nope. It works fine on Office 2007 (32-bit) running on Windows 7 64-bit. Typically, bitness problems involving Office interop are because of a mismatch with Office, not with Windows. For example, trying to run 32-bit extension in 64-bit Office. The only time I could get a "#VALUE" error to show up was when I didn't supply 3 arguments. I used the article you linked to and copied the code exactly (except for changing the GUID) as well as the exact steps for registering the Add-In in Excel.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      P 1 Reply Last reply
      0
      • D Dave Kreskowiak

        PozzaVecia wrote:

        Basically my UDF can't accept a link to a cell as argument... can this bug be connected with 64 bit of Windows?

        Nope. It works fine on Office 2007 (32-bit) running on Windows 7 64-bit. Typically, bitness problems involving Office interop are because of a mismatch with Office, not with Windows. For example, trying to run 32-bit extension in 64-bit Office. The only time I could get a "#VALUE" error to show up was when I didn't supply 3 arguments. I used the article you linked to and copied the code exactly (except for changing the GUID) as well as the exact steps for registering the Add-In in Excel.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        P Offline
        P Offline
        PozzaVecia
        wrote on last edited by
        #3

        Quote:

        Nope. It works fine on Office 2007 (32-bit) running on Windows 7 64-bit.

        Yes I tested the same Excel 2007 32bit with Windows 7 64bit is fine.. I have the problem with Excel 2010 32bit with Windows 7 64bit. I thought It was a problem of bit because if I type argument in a cell the UDF does't work (I thought It was a bit conversion problem). While if I directly write arg in function it works. I also create a function with no args and it works (Excel 2010). So the problem is linked to reading arg from other cells. Very strange

        D 1 Reply Last reply
        0
        • P PozzaVecia

          Quote:

          Nope. It works fine on Office 2007 (32-bit) running on Windows 7 64-bit.

          Yes I tested the same Excel 2007 32bit with Windows 7 64bit is fine.. I have the problem with Excel 2010 32bit with Windows 7 64bit. I thought It was a problem of bit because if I type argument in a cell the UDF does't work (I thought It was a bit conversion problem). While if I directly write arg in function it works. I also create a function with no args and it works (Excel 2010). So the problem is linked to reading arg from other cells. Very strange

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I don't have Office 2010, so I can't test against that.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups