简体   繁体   中英

Embed office 2010 excel file in a c# Winform Application

I have spent the last 2 hours researching how to embed an excel file along with its formulas for a few cells and display it in a Winform application so the user can enter values and also the c#app can modify cell values based on some other resource data that is fed in via a USB port.

I cannot find any method other than these two - the first isn't supported and the other is 16 years old. Is this possible / supported to embed an excel sheet in ac# application? Please note, I do not want to open the excel sheet and copy the data into a datagrid or similar as i need to use excel's functionality of conditional formulas to turn cells green if certain criteria are met etc etc the list of excel benefits goes on here. There are hundreds of these conditional formatting and embedded upper/lower limits in an existing excel file and i just want to embed the file and use excel's already excellent functionality.

Method 1 DSOFramer - No longer supported Method 2 https://www.codeproject.com/Articles/15760/How-to-Integrate-Excel-in-a-Windows-Form-Applicati

using interop.excel with c# you can open excel, show it, interact with it using events to capture cell entry and cell change. its not embedded in the form but the end result is the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM