none
Standalone WPF with Excel capabilities? RRS feed

  • Question

  • Hello World,

      I know this is going to be a really "I´ve-seen-this-before" question, but trust me, I´ve been looking for a real answer for over half month. Too much information, so.. please, help!

      The basis: I´ve developed in excel a set of macros and info which produces complex charts, just by introducing some numeric values in cells and running those macros

      The goal: I need  to develop in WPF a standalone application, able to :

    • show the chart (and only the chart, which is not embedded in any spreadsheet)
    • introduce new values in key cells                      
    • run the macros (and that includes some chart events)

      The problem: this program should be independent from MSOffice installation, so its ability to run doesn´t depend on versions or so

      Is there any efficient way to achieve so? I have little experience programming WPF (though good experience with VBA), but it´s not a learning problem.. I´ve found that interop solution can be quite limited..

    Any suggestions?  Thanks for any help you can provide

    Wednesday, March 16, 2011 1:22 PM

Answers

  • Hi JMPel,

    Thanks for posting in the MSDN Forum.

    This is the forum for VSTO developers. I suggest you consult WPF forum for help, because in this issue you will use more WPF technical skills than use VSTO.

    In there I will show something regard to Excel to you for reference.

    At first, you are able to import Microsoft.Office.Interop.Excel namespace to use Excel model.

    Second, you are able to use Application instance of Excel to open a specific excel workbook as your data file.

    Third, you can use Application.Run to call the macro in the excel work book.

    As the char control, I found there are many kinds of control for WPF which you can find it via Bing, google. I provide one of these resources to you: http://wpf.codeplex.com/releases/view/29117 . I hope it can help you.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by JMPel Saturday, March 19, 2011 3:24 PM
    Friday, March 18, 2011 7:00 AM
    Moderator

All replies

  • Hi JMPel,

    Thanks for posting in the MSDN Forum.

    This is the forum for VSTO developers. I suggest you consult WPF forum for help, because in this issue you will use more WPF technical skills than use VSTO.

    In there I will show something regard to Excel to you for reference.

    At first, you are able to import Microsoft.Office.Interop.Excel namespace to use Excel model.

    Second, you are able to use Application instance of Excel to open a specific excel workbook as your data file.

    Third, you can use Application.Run to call the macro in the excel work book.

    As the char control, I found there are many kinds of control for WPF which you can find it via Bing, google. I provide one of these resources to you: http://wpf.codeplex.com/releases/view/29117 . I hope it can help you.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by JMPel Saturday, March 19, 2011 3:24 PM
    Friday, March 18, 2011 7:00 AM
    Moderator
  • Hi Tom!

    Thanks for your answer!

    Yep, I know about interop namespace, which I intend to use in order to acces and write simple information.

    The problem is that I cannot find a way to open inside my WPF window an active excel window, like it was posible with the deprecated OLE model.

    I just discovered that the webbrowser control just opens the document in a excel instance. There is a registry workaround for it, but I think there is no chance I can use advance events inside browser exploration...

    I´ve found about the WPFToolkit Charset abilities, but it would compulse me to rebuild most of my programming in excel (and its far more complicated than I can express, because I´ve build a visual analysis tool with the graphic abilities of some advance graph tools like matlab)

    So I will take into account your advice, and moving this to WPF forums.

    Thanks for your help, I will keep this this thread open for a while, if not more usefull answers come, i´m marking yours as the answer ;)

    Friday, March 18, 2011 11:05 AM