dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.04k stars 1.17k forks source link

When exporting data into excel, we are exception thrown on Microsoft Interop Excel in Net Core 3.1 #6836

Open saiganesh-sakthivel opened 2 years ago

saiganesh-sakthivel commented 2 years ago

Screenshot (327)

Expected behavior: It should work correctly.

Minimal repro:

GanttWPF_Core.zip

lindexi commented 2 years ago

@saiganesh-sakthivel See c# - How to reference Microsoft.Office.Interop.Excel dll? - Stack Overflow

And you miss the Office.dll which will be referenced as assmeblies in .NET Framework. And you should add the Office.dll explicitly in .NET Core.

I fixed your code in : https://github.com/lindexi/lindexi_gd/tree/3e2f2a2bbb0c433148a547b20f321dcb866e10cf/GanttWPF_Core