Can the Open XML SDK be used in Mono?
Edit: It seems to be working in the meantime: https://mcmap.net/q/1055174/-can-i-use-the-open-xml-sdk-in-mono
Today (somewhere in 2011) I played around with the SDK and Mono 2.6.
First I checked what MoMA thinks of the dll:
4 different Methods in DocumentFormat.OpenXml.dll
need the following method from Mono
which is not available. At least according to MoMA.
void XmlReaderSettings.set_MaxCharactersInDocument (Int64)
But I was brave and tried to do stuff.
The bad thing: It didn't really work well for me. I managed to create a very simple docx with the content "Hello World" and then load and read the file again. But as soon as I wanted to open user created and more complex documents stuff started to crash and break. There are some nasty Null Pointer Exceptions lurking around and sometimes the opened file even gets destroyed. Maybe because of the one missing method. It's a pity.
Conclusion: At the moment the OpenXML SDK from Microsoft is not usable with Mono.
As of 2014 the SDK has gone open source. So, an updated answer is yes, check this latest screencast.
and it has been merged into the latest version. check the pull request: https://github.com/OfficeDev/Open-XML-SDK/pull/3
No.
Refer this post and the comments as follows.
Zeyad Rajabi 13 Oct 2008 12:58 PM
@Christian – The SDK has not been ported to MONO, yet. We are still investigating. As for your question related to native code, the SDK is built entirely on .Net as such is managed code.
Zeyad Rajabi(MS)
Also refer this question where a user tried to use it and got an error.
Even the libraries section of mono refers a 3rd party tool:GemBoxSoftware
WindowsBase
(which System.IO.Packaging
needs in Mono and VS). The reference on superuser is for someone who has not set a reference to WindowsBase
. But again, you did not ask how this could be done, only if it could be done, to which the answer is yes. I've done it myself. You may also look at my tags on my profile page to see I know what I'm talking about. –
Bankruptcy Yes, the SDK can be used in Mono.
© 2022 - 2024 — McMap. All rights reserved.