The ease of Excel makes it very popular in non-developer offices, while Excel does provide many useful functions. In many cases, we also need to use Excel as the data source for processing or use Excel as a template to generate some reports. Before the open xml sdk came out, we mostly used the method of referencing the office class library for processing, but this operation was very troublesome. The emergence of open xml sdk allows us to process the data in a natural way, this article will show you how to use the open xml sdk to Operate Excel in the form of LINQ to XML.
These codes are based on open xml sdk ctp 2. Please download open XML format SDK 2.0 before use. Click here to download. The SDK is installed in the c: \ Program Files (x86) \ open XML format SDK \ V2.0 (64bit) directory by default, and documentformat In the Lib subdirectory. openxml. dll must be referenced in the project.
Open XML format SDK reference