none
How to check Excel bit version 32 or 64 bit? RRS feed

  • Question

  • Hello,

    How can we check what Excel bit version client is running?

    I know I can do this in Excel via VBA, but I have no idea how to check in C# Excel-AddIn then user trying to launch it.

    I can create function in VBA and from C# call it and get return, but maybe there is straight method?

    Thanks

    Thursday, April 16, 2020 12:57 PM

Answers

  • Check IntPtr.Size -- If your add-in is loaded into a 32 bit Excel process (also WOW64 process on 64 bit windows) it will be 4 and in a 64 bit Excel process it will b 8.
    • Marked as answer by Vytautas A Tuesday, June 30, 2020 6:05 AM
    Monday, May 25, 2020 10:25 AM

All replies

  • Try using Environment.Is64BitProcess inside ThisAddIn_Startup, this will tell if the calling process is 64 bit or not.

    Regards,

    Abhijit.

    Friday, April 24, 2020 1:02 PM
  • Try using Environment.Is64BitProcess inside ThisAddIn_Startup, this will tell if the calling process is 64 bit or not.

    Regards,

    Abhijit.

    'System.Environment' does not contain a definition for 'Is64BitProcess'


    Monday, May 25, 2020 7:33 AM
  • 1. Open Excel.

    2. Click the File tab.

    3. Click Account.

    4. To the right, there is the About Excel button. Click it.

    5. On the top, just under "About Microsoft Excel ...", there is an Excel version. At the end there is written whether it's 32 or 64 bit version.

    Monday, May 25, 2020 9:46 AM
  • 1. Open Excel.

    2. Click the File tab.

    3. Click Account.

    4. To the right, there is the About Excel button. Click it.

    5. On the top, just under "About Microsoft Excel ...", there is an Excel version. At the end there is written whether it's 32 or 64 bit version.

    This is VSTO forum :D, it's not basic question about Excel or other MS Office app what bit version using. Read my question not only Title. I'm asking how to check it then I'm running for eg. ThisAddIn_Startup
    Monday, May 25, 2020 9:56 AM
  • Check IntPtr.Size -- If your add-in is loaded into a 32 bit Excel process (also WOW64 process on 64 bit windows) it will be 4 and in a 64 bit Excel process it will b 8.
    • Marked as answer by Vytautas A Tuesday, June 30, 2020 6:05 AM
    Monday, May 25, 2020 10:25 AM
  • Check IntPtr.Size -- If your add-in is loaded into a 32 bit Excel process (also WOW64 process on 64 bit windows) it will be 4 and in a 64 bit Excel process it will b 8.
    Thanks! sry for late response.
    Tuesday, June 30, 2020 6:06 AM