CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2023
    Posts
    10

    excel automation

    Hi,
    I import office 365 excel.exe my excel automation project using vc++ 2015, in 32 bit.
    When i run it on PC with office 2016 installation, at line with pSheet->SavcAs(...) i get error like module or method not found with a large negative number. I do not have the exact error message.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,417

    Re: excel automation

    Quote Originally Posted by J2Int View Post
    Hi,
    I import office 365 excel.exe my excel automation project using vc++ 2015, in 32 bit.
    When i run it on PC with office 2016 installation, at line with pSheet->SavcAs(...) i get error like module or method not found with a large negative number.
    Do you mean that your code worked with Office 265?

    Quote Originally Posted by J2Int View Post
    ...
    I do not have the exact error message.
    Why????????????
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2023
    Posts
    10

    Re: excel automation

    it works in 365 version.
    the error from running it with 2016 is :
    -2147352573
    member not found.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,417

    Re: excel automation

    Is office 2016 a 32- or 64-bit version?
    The same question - about office 365.
    Victor Nijegorodov

  5. #5
    Join Date
    Aug 2023
    Posts
    10

    Re: excel automation

    the app itself is 32 bit. The excel.exe in the 365 one that is working is 64 bit.
    the excel.exe in office 2016 in another PC that gives the error is 32 bit.
    The #import function is linked to excel.exe. I could not locate 32 bit excel.exe in the office 365 installation folder.

  6. #6
    Join Date
    Feb 2024
    Posts
    9

    Re: excel automation

    It sounds like there might be an issue with the version mismatch between Office 365 and Office 2016. Since you're using VC++ 2015, it's possible that the method you're trying to call is either not available or has changed between versions. One thing you could try is checking if you're using the right version of the Office API or updating your references to match Office 2016. Also, double-check the method name and make sure there aren't any typos.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured