Click here to Skip to main content
15,913,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a form where it has two buttons view and save . When i click on the view it should display the excel sheet in the form window and when i click save it should the excel sheet in sys .

Studied this Opening and Navigating Excel with C#[^]

wrote this for view button click event

Excel.Application excelApp = new Excel.ApplicationClass();
            excelApp.Visible = true;


It opens an excel application . Is it possible to open on form window .
Posted
Updated 26-Aug-11 4:24am
v2

1 solution

There is a way to use the WebBrowser control which you can add to your form and use to open an Office document. Please see this Microsoft Knowledge Base article: http://support.microsoft.com/kb/243058[^].

—SA
 
Share this answer
 
Comments
steven8Gerrard 27-Aug-11 3:24am    
Tried it but i get this error .

Error 1 The type 'AxSHDocVw.AxWebBrowser' exists in both 'c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\AxSHDocVw.dll' and 'c:\Documents and Settings\IWI\Desktop\FormUItest\FormUItest\obj\Debug\AxInterop.SHDocVw.dll' C:\Documents and Settings\IWI\Desktop\FormUItest\FormUItest\Form1.Designer.cs 3295 FormUItest


Any method to overcome this one

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900