View Excel file using Activex Control

yohan.jayarathna picture yohan.jayarathna · Apr 1, 2011 · Viewed 8.3k times · Source

I want to view excel file in my windows application which I am trying to build using visual studio 2010.

How can I do this ?

Is there any excel activeX control for this.

Suggestion are warmly welcome....

Please Help

Answer

alisabzevari picture alisabzevari · Jun 26, 2011

Actually I found two techniques to do this:

  1. Use a Web Browser control: And it is better to use AxWebBrowser because when you use 2007 and 2010 version of excel the ribbon can not be shown and using this control instead of WebBrowser is better to help solve this problem.
  2. Use SetParent Win32 API: I think this is the better solution because it is more controllable. Fortunately the complete control implemented by this technique is published in CodePlex and it is here: ExcelViewer