Error:-2147217900: Incorrect syntax near 'office' RRS feed

  • Question

  • Hi,

    I have created a Project (framework 4.0) that writes to an excel file on Win 7 machine. The project references Microsoft.Office.Interop.Excel version 12.0 and MS Office 2013 is installed on the development machine.

    I am getting the below error when I tried to run the same project on Windows Server 2003 remote server with MS Office 2007 installed on it.
    Error:-2147217900: Incorrect syntax near 'office'.

    Could you please help

    Thanks in advance..

    • Moved by George123345 Tuesday, December 16, 2014 6:26 AM Excel dev issue
    Monday, December 15, 2014 9:49 AM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    George Zhao
    TechNet Community Support

    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.

    Tuesday, December 16, 2014 6:25 AM
  • Hi Indu,

    I would like to know the details:

    1. How do you add that reference to your project? Are you copy assembly file from other machine to development machine?
    2. Is that project working fine in development machine?
    3. How do you deploy that project?

    Please provide the detail steps and detail code, we will check it.

    On the other hand, Microsoft does not support server-side automation of Microsoft office applications.

    # Considerations for server-side Automation of Office

    Best Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 17, 2014 9:51 AM