简体   繁体   English

如何在c#windows phone 8.1应用程序中写入excel文件?

[英]how to write into the excel file in c# windows phone 8.1 application?

I am trying to write into the excel file in Windows phone 8.1. 我正在尝试写入Windows Phone 8.1中的excel文件。 application, but i was not able to find any API available from Microsoft or any 3rd party library supporting the same. 应用程序,但我无法找到Microsoft提供的任何API或任何支持相同的第三方库。

I have tried using the DocumentFormat.OpenXml assembly but it did not work for windows phone programming 8.1 and throws exception. 我已经尝试使用DocumentFormat.OpenXml程序集,但它不适用于Windows Phone编程8.1并抛出异常。

Thank you, Roopa 谢谢你,罗帕

There are different 3rd party libraries out there that also work on Windows Phone. 有不同的第三方库也适用于Windows Phone。 Those that I know of are: 我所知道的是:

Open Source: 开源:

  • Ag.OpenXML : I'm using this in one of my apps to generate an Excel file and it works quite well. Ag.OpenXML :我在我的一个应用程序中使用它来生成一个Excel文件,它运行得很好。 It is a bit outdated and their official builds don't include the Excel part. 它有点过时,他们的官方版本不包括Excel部分。 So you have to download and compile the latest version from the master branch your own. 因此,您必须从您自己的主分支下载并编译最新版本。 One downside is that there is an issue with the data types. 一个缺点是数据类型存在问题。 Text (string) and numbers (int) work well but DateTime doesn't translate correctly to the excel format so I converted it to string before. 文本(字符串)和数字(int)运行良好,但DateTime无法正确转换为excel格式,因此我之前将其转换为字符串。 With this, the user of the Excel file will however loose some date specific info. 这样,Excel文件的用户将丢失一些特定于日期的信息。

Commercial: 商业:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM