I am trying to display an Excel file within a Windows Form, not based with .NET, but just for a desktop application. I need to be able to save the form as a PDF in a location on users personal computer and then also print it out. I don't want the file to open a Excel sheet but for it to look like its part of the form.
Asked
Active
Viewed 7,671 times
1
-
Possible duplicate of [How to open an Excel file in C#?](http://stackoverflow.com/questions/464902/how-to-open-an-excel-file-in-c) – Kangjun Heo Mar 24 '17 at 08:32
-
I am wanting to know if there are any example projects of this ? – user3283123 Mar 24 '17 at 08:36
-
This may help you https://social.msdn.microsoft.com/Forums/windows/en-US/0d37c5a9-b086-43d3-9d34-056159263e54/embed-excel-workbook-in-windows-forms?forum=winforms – Kangjun Heo Mar 24 '17 at 08:37
-
I don't want it in a web browser is there a way without – user3283123 Mar 24 '17 at 11:52
-
I think it's the easiest solution, you will waste less time and effort. Why don't you want to see it like this? – Federico Navarrete Mar 25 '17 at 20:35
-
It'for a software which may be used where there is no acsess to Internet .... Needs to be on local desktop x – user3283123 Mar 26 '17 at 00:12
-
Check if this helps: https://code.msdn.microsoft.com/View-and-Edit-Excel-11db98ac – Dheeraj Malik Mar 27 '17 at 02:31
-
I don't think the browser has any relation with the internet. I think it's only an interface. I'd suggest to run it and later, unplug the internet cable and check if it really uses the internet, but I don't think so. – Federico Navarrete Mar 28 '17 at 12:40
1 Answers
1
I can recommend you this example:
How to Integrate Excel in a Windows Form Application using the WebBrowser
You can embed the Spreadsheet into a Windows Forms with that trick from bsargos.
For the export you can try this:

Federico Navarrete
- 3,069
- 5
- 41
- 76