views:

97

answers:

2

Hello,

Is it possible to embed Office application in WinForms controll (having office installed on computer) ?

Thanks for help

+1  A: 

Yes, it is possible. Excel is available as a control and you can use it. Look for licensing issues if any.

Kangkan
Could You please give me a link to information about that controll? I cant find it
gruber
There is a similar query on StackOverflow: http://stackoverflow.com/questions/757023/embed-excel-sheet-in-c-user-control
Kangkan
It doesnt work, It opens workbook in other windows as other application
gruber
+1  A: 

You just need to add these using statements:

using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;

Then you can add ExcelObj and add a Workbork and a Worksheet to that. Its all pretty self explanatory.

Sir Graystar
Yes, I know that I can create excel objecst like that but is it possible to view them in my winforms or WPF application ?
gruber
For example just view excel workbook or word document witch reduced (if not only view) functionality. And then for example add two buttons to move from age to next or previous (in word case)
gruber
Just found a link which uses thia method, and allows you to integrate the interfaces themselves: http://www.codeproject.com/KB/office/Embedding_Excel.aspx
Sir Graystar
It doesnt work, It opens workbook in other windows as other application
gruber