Android的单声道,阅读和写入XLSX [英] Mono for Android, reading and writing to XLSX

查看:162
本文介绍了Android的单声道,阅读和写入XLSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用Android的Mono应用程序。我需要读取和创建XLSX(Excel)文件的功能。我已经尝试过EPPlus和NPOI,并快速浏览了Microsoft的Open XML SDK,并发现以下问题:


  1. EPPlus需要WindowsBase AFAIK,我不能在Mono中使用这个程序集

  2. NPOI需要System.Drawing,在Mono中似乎不起作用

  3. Open XML SDK需要WindowsBase程序集。

所以我没有用的想法,有没有可以在Mono下运行的库支持XLSX?有没有解决方法来使这些图书馆工作?



我需要做的事情是
1.插入图片
2。操作单元格文本

解决方案

创建了一个NPOI的叉,而不引用System.Windows.Forms,System.Drawing和System.Configuration,使其适合与Xamarin一起使用。到目前为止,它与Xamarin.Mac统一的API一起工作。



请注意,这是通过删除功能而不是替换它们实现的,但大多数核心功能应该不受影响。 / p>

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

解决方案

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.

这篇关于Android的单声道,阅读和写入XLSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆