-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to Office.Interop from .NET Core? #402
Comments
Just to add that that the major reason for doing this would be if it could be made available on OSX as well as Windows, thereby offering cross-platform portability of applications that interwork with Microsoft Office (externally via COM objects) on Windows and OSX. |
Hey @TechiMe, thanks for filing this. I assume the question isn't about adding the Excel automation APIs to .NET Core directly but instead have a way to automate Excel from .NET Core. Is that correct? |
Hi Immo, Yes, exactly! The only way to automate Excel for Mac at present is via embedded VBA or Javascript (Office Addins), neither of which come anywhere close to the power and flexibility of the manipulation of objects in C# which is possible for Excel for Windows. So we were hoping that .Net Core might be able to fix this hole! Many thanks. |
Ah, so that's an even different question.
That being said, whatever mechanism JavaScript/VBA is using on Mac, we could look into supporting this for .NET Core, but I have no idea how much would be required to do so. |
Well the first is definitely possible because we do it all the time, just by referencing Office.Interop.Excel. But, in line with what you suspect I think, I have read in various places that (up until now at least, before the advent of .Net Core) it would not be possible to make this API available on the Mac because the "unix-like architecture of OSX is not compatible with COM automation". But, exactly as you say in your final para, somehow it is being done for the JavaScript/VBA interfaces on the Mac, so if you can make "whatever THAT is" available in .NET Core, you'll be the hero of the hour!!! |
Related: #409 |
We have no plans to make Office COM APIs work on Mac or Linux. If the Office team produces docs on how to do this, we'd be happy to take a look. Closing as a result. |
Office package doesn't work under this configuration, but directly referencing the COM does. dotnet/core#402
I'm confused - isn't Interop currently supported for all three platforms? Windows is certainly supported right now in .NET Core for Office interops? I just tried opening an excel file and writing something to it and it worked with no hassles. |
Is there a plan to add Office.Interop.Excel to available namespaces in .Net Core Class Library?
The text was updated successfully, but these errors were encountered: