locked
Rehost Excel inside a Windows Form RRS feed

  • Question

  • Hi

    Is it possible to rehost an Excel Document inside of a Windows Form using VSTO? Can anyone provide me with links to online documentation?

    Thanks!


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community. Happy programming!

    • Moved by Quist Zhang Wednesday, April 17, 2013 2:24 PM
    • Moved by Cindy Meister MVP Thursday, April 18, 2013 1:04 PM not relevant to the vSTO technology
    Monday, April 15, 2013 1:08 PM

Answers

All replies

  • Hi,

    you post the thread on error forum, you should post this question in below forum:

    Visual Studio Tools for Office

    I think you can get more help from there. Thanks


    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer.

    Tuesday, April 16, 2013 5:46 AM
  • Hi DirkStauss,

    I find an online documentation to show that how to rehoset an excel document in Windows Forms by using WebBrowser.

    You can refer to the below link to get more help and codes:

    How to Integrate Excel in a Windows Form Application using the WebBrowser

    you also can refer to the below thread to know more information.

    Excel file preview: How to show inside a form

    excel in c# window forms


    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample

    Thursday, April 18, 2013 3:07 AM
  • Hi

    Thanks for your reply. Is there a way to do this without using the web browser? I want to be able to rehost the excel doc inside my form.


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community. Happy programming!

    Thursday, April 18, 2013 12:54 PM
  • Hi Dirk

    You can use the Web Browser control to host an Office file (Excel workbook) in your Windows Form. Note that this has nothing to do with VSTO: a VSTO workbook cannot work in that environment.

    Please also note that the Office applications weren't designed to be used in this manner (nor does Microsoft encourage you to do so) and there are a number of things that you cannot control and/or do not work optimally. You cannot, for example, remove the Ribbon (menus) in the application.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, April 18, 2013 1:04 PM
  • Hi 

    As far as I know, you cann't host excel into your WinForm directly, you must use Other Component to host excel document, you also can use Visual C++ ActiveX Control named DSOFramer.ocx to host the Excel Document, you can add WinForm control into your WinForm. For more question, you can refer to the thread:

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7eba893b-436f-4ee8-8956-6621cc28ef77

    Thanks


    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample

    • Proposed as answer by Learning hard Thursday, May 2, 2013 7:32 AM
    • Marked as answer by Quist Zhang Monday, May 6, 2013 5:47 AM
    Thursday, April 18, 2013 1:04 PM