Xamarin如何读写Excel?
打算开发个小的App,其中需要用到读写Excel文档,尝试了以下方法都不成功,期望各位大神的解答。
1、尝试过使用Microsoft Excel 12.0 Object Library读写Excel,但是好像要在Android设备上安装Excel,果断放弃该方案。
2、尝试使用Oledb读取Excel,但是在引用项中未找到Oledb.....
3、尝试使用NPOI读写Excel,但是将NPOI的系列引用添加到项目后,出现了报错:
“Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
文件名:“System.Drawing.dll”
在 Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
在 Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
在 Xamarin.Android.Tasks.ResolveAssemblies.Execute()”
在网上查询了一下,发现Mono.Android与System.Drawing的兼容有BUG,怀疑后NPOI中有使用System.Drawing的地方,导致该问题出现。原帖http://lists.ximian.com/pipermail/monodroid/2012-March/009426.html
想不到其他方法了,各位在使用Xamarin处理Excel时候是怎么做的?