Reading and Writing to Excel sheet in C# UWP Windo

2019-08-02 19:47发布

问题:

I am working on a project for Windows 10 UWP App. I have below two problems

1. I have to upload excel sheet containing the data, and store that data into Sq-lite Database.

2. Also I have to read data from database table, and write to excel sheet in rows and column format.

I have searched a lot but could not find any library or helping blog. I would be thankful for any complete guide or sample code. Thanks!!

回答1:

I would suggest you use Syncfusion Essential XlsIO. It does the work for your read/write of excel files (also works with Xamarin and ASP.Net). It has a 30-day free trial but you can get a free community license.



回答2:

Just so you know, thx to .Net Standard 2.0 we are able to use the OpenXML SDK! This allows you to create and/or manipulate MS Office documents.

As an example I've blogged about creating Excel files on the fly in Xamarin Forms ( that also can generate an UWP app ) here http://depblog.weblogs.us/2017/10/13/net-standard-2-0-create-microsoft-office-documents-in-xamarin-forms/

The SDK itself is open source https://github.com/OfficeDev/Open-XML-SDK and there is a very large detailed documentation site available too https://msdn.microsoft.com/en-us/library/office/bb448854.aspx