Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use the Open XML SDK in Mono?

Can the Open XML SDK be used in Mono?

like image 665
akosch Avatar asked May 26 '11 21:05

akosch


People also ask

What is Open XML SDK?

The Open XML SDK 2.5 simplifies the task of manipulating Open XML packages and the underlying Open XML schema elements within a package. The Open XML SDK 2.5 encapsulates many common tasks that developers perform on Open XML packages, so that you can perform complex operations with just a few lines of code.

Does EPPlus use OpenXml?

EPPlus is a . NET Framework/. NET Core library for managing Office Open XML spreadsheets, distributed via Nuget .

Is DocumentFormat OpenXml free?

documentformat. openxml. dll free download | DLL‑files.com.

Is Open XML SDK open source?

The Open XML SDK is Now Open Source.

What is Open XML in C#?

The Open XML SDK provides . NET developers with a set of strongly typed classes that make it easy to read, write and manipulate the parts and content in an Open XML document such as the DOCX, XLSX or PPTX files created by Microsoft Office. It can be used in any .


2 Answers

Edit: It seems to be working in the meantime: https://stackoverflow.com/a/28322467/743897

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.

like image 61
toabi Avatar answered Oct 05 '22 22:10

toabi


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

like image 28
efinal Avatar answered Oct 06 '22 00:10

efinal