Q:

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. application, but i was not able to find any API available from Microsoft or any 3rd party library supporting the same.
I have tried using the DocumentFormat.OpenXml assembly but it did not work for windows phone programming 8.1 and throws exception.
Thank you,
Roopa

A:

There are different 3rd party libraries out there that also work on 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. It is a bit outdated and their official builds don't include the Excel part. 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. With this, the user of the Excel file will however loose some date specific info.

Commercial:

ComponentOne Studio for WindowsPhone: I recently switched to this library as it provides support and they don't have the DateTime issue. This also works quite well for me and it requires a lot less coding than Ag.OpenXML.
Syncfusion Essential Studio for Windows Phone: Can't say much about this toolkit as I haven't used it but they also provide Excel support.

