Как интегрировать excel в приложение C# windows без использования веб-браузера?
Required scenarios are 1. Excel should be open inside application. 2. Excel has some formulas/micro, that should work as expected. 3. Rows are pragmatically added and removed from excel.
Что я уже пробовал:
[DllImport("user32.dll")] private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
excelApp = new Microsoft.Office.Interop.Excel.Application(); Process p = Process.Start("excel.exe"); Thread.Sleep(1000); // Allow the process to open it's window SetParent(p.MainWindowHandle, this.panel1.Handle);