Mono for Android, reading and writing to XLSX

為{幸葍}努か 提交于 2019-12-23 18:53:26

问题


I am developing an app using Mono for Android. I need capabilities to read and create XLSX (Excel) files. I have tried with EPPlus and NPOI, and had a quick look at Microsoft's Open XML SDK and found the following problems:

  1. EPPlus requires the WindowsBase assembly which, AFAIK, i can't use this assembly in Mono
  2. NPOI requires System.Drawing, which doesn't seem to work in Mono
  3. Open XML SDK requires the WindowsBase assembly.

So i am running out of ideas, is there any library that i can run under Mono that supports XLSX? Is there any workaround to get these libraries working?

The thing i need to be able to do is to 1. Insert images 2. Manipulate cell texts


回答1:


I created a fork of NPOI without references to System.Windows.Forms, System.Drawing and System.Configuration making it suitable for use with Xamarin. So far it's working well with the Xamarin.Mac unified API.

Note that this is achieved by removing capabilities rather than replacing them, but most core functionality should be unaffected.




回答2:


I put a link below to a component on the Xamarin component store that will allow you to edit / read / write XLSX or XLS files.

Component




回答3:


Try this port of OpenXmlSdk to Xamarin https://github.com/wotzisname/open-xml-sdk-xamarin



来源:https://stackoverflow.com/questions/19102998/mono-for-android-reading-and-writing-to-xlsx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!