Original http://www.cnblogs.com/asxinyu/p/dotnet_opensource_project_3.html
In the first 2 articles these. NET open source project you know what? Let. NET open source come more violently and these. NET open source project you know what? Let. NET open source come more violent! In the second series, everyone is in high spirits. Take out your Sihuo again and work on the. NET Platform for document-related open source components. Document processing is a very common task in development, such as exporting Excel, exporting Word, generating PDF reports, and so on. Let's look at the following today. NET open source project you know, No. If it is useful, don't forget to recommend Oh. At the same time limited personal capacity, I hope you can add. . NET Open Source directory: "directory" this blog other. NET open source project articles directory
This article original address: these. NET open source project you know what? (third). NET open source document and report processing 1.Excle artifact Npoi
Npoi is a. NET version of the POI project. POI is an Open-source Java project that reads and writes Microsoft OLE2 component documents such as Excel, Word, and so on. Npoi gives the. NET platform a more complete tool for reading and writing Excel. The usage is very wide and should be one of the most exposed in open source. NET Excel reading and writing tools.
The advantages of using Npoi are: Completely free use, containing most of the Excel features (cell styles, data formats, formulas, and so on), supporting the processing of file formats including XLS, XLSX, docx. Interface-oriented design architecture (can be viewed npoi. SS namespace), while supporting file import and export, you do not need to install Microsoft Office on the server to avoid copyright issues. More user-friendly and user-friendly than the Office PIA API. So what are you waiting for? Here is the first time I use Npoi to do a daily report tool, inside the cell merging is in the process of dynamic completion of the process is very difficult, but the result is very beautiful, has been used for 2 years, stable without bugs, very to the force AH.
Official website: http://npoi.codeplex.com/
Https://github.com/tonyqus/npoi
Official tutorial: http://www.npoi.info/ 2.NPOI extended-npoi. CSS
Npoi. CSS is a npoi extension that can be used to set cell styles in a CSS-like manner when using NPOI, supported only. NET4 and above versions of the project. This extension is designed to facilitate the use of the cell and its associated format style, you can use a similar way to the CSS, very power. Look at the following code:
Cell. CSS ("Color:red;font-weight:bold;font-size:11;font-name: Song body; border-type:thin;")
Official website: https://github.com/qihangnet/npoi.css 3.yjinglee.office
Yjinglee.office is used for Excel operations on the. NET platform, the main encapsulation Npoi provides a more simple and practical API to provide the following functional points:
1. Read Excel data into Object Collection 2. Write collection to Excel and provide Excel style definition
Look at a section of code that reads Excel:
var Reports = new Collection ();
for (var i = 0; i < i++)
{
Reports.add (new) {Id = i*100, Name = Guid.NewGuid (). ToString ()});
var excel = new Excel (new DefaultStyle ());//Create an instance of Excel that can pass different style instances
Excel. Createsheet ("test");//Create a sheet, named Test
Excel. WriteObject (Reports, 0, 0);//write the collection Excel on line No. 0 in Sheet0
. Setcolumnwidth (0, 0, new [] {5, 35});//Set column width excel in the No. 0 column of Sheet0.
WriteFile (Path.Combine (AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "demo.xlsx"))//Save File
4.ExcelReport Report Engine
Excelreport is a report Engine component based on NPOI development. It separates the data from the style and format based on the idea of separation of attention points. Let the template bearer style, format, etc. npoi not good at and implementation of cumbersome information, combined with Npoi on the merits of data processing, Excel report generation to simplify. At the same time, the basic elements of the report composition are abstracted, further simplifying the production process of Excel report.
Official website: https://github.com/hanzhaoxin/ExcelReport
Introduction article: http://www.cnblogs.com/hanzhaoxin/p/4472860.html 5.Epplus
Epplus is an open source component that uses the Open Office XML (Xlsx) file format to read and write Excel 2007/2010 files. Compared with Npoi, it supports the XLSX format earlier, while Npoi supports Excel 2003 better, and now the new version of Npoi is starting to support xlsx. So there's a little difference between the two of them. Epplus I did not use, but very early heard, but also the use of a very official one, has been updated. Look at the use of everyone's needs. Can try. The scope of support is also wide, for example: cell merging, cell style, chart (this npoi is not very good at present), tables, data validation, formulas, VBA and so on.
Official website: http://epplus.codeplex.com/ 6.LinqToExcel
Linqtoexcel is an open source project under the. NET platform, which implements LINQ syntax query Excel spreadsheets. Type of linqtoxxx if you are a LINQ grammar candy lover That's best for you. For example, the following code queries the head of a spreadsheet:
var excel = new Excelqueryfactory ("Excelfilename");
var indianacompanies = from C in Excel. Worksheet<company> ()
where c.state = = "In"
select C;
Official website: https://github.com/paulyoder/ 7.NetOffice Components
The Netoffice component is unique and is a powerful component of office operations, including working with Office, Excel, Word, Outlook, PowerPoint, Access, Project, Visio, and so on, so support is very comprehensive. But this component is not written entirely individually, it calls Microsoft Office interop assemblies and VSTO, which is a deep encapsulation so you don't have to install these things, just copy the appropriate assembly. Currently includes 16 operational assemblies. Depending on your needs, you can select the appropriate assembly. It has several advantages:
1. No version restrictions for office;
2. Support office2000,2003,2007,2010,2013 version, that is, support all Office version, strong enough;
3. Independent development between supported versions
4. The syntax of the operating syntax is the same as that of Microsoft's interop assemblies; so it is easier to learn and use;
5. If you are familiar with the Office object model, you can use your existing PIA code without needing to learn again;
6. Optimized code for some COM operations
7. can be in. NET2.0 and above environment use;
8. Easy deployment, no need to register, no dependencies of the Assembly
Other features to see the official document introduction, if free, everyone to this strong demand, you can write articles specifically introduced.
Official website: http://netoffice.codeplex.com/ 8.Word document Reading and writing tools docx
Docx is a lightweight way to manipulate word 2007/2010 files in a very intuitive and straightforward manner. NET component. It's very fast, and you don't need to install Microsoft Office software. In China, free and compact WPS has plenty of reasons for many users to abandon their huge office, which is useful in the real software development process. Regret is not supported 2003, but is always eliminated trend, and with WPS, there is no version of the difference. currently supports inserting, deleting, and replacing text in files, supporting all text formats, such as fonts, underscores, highlighting, and so on; support for inserting pictures, hyperlinks, tables, headers, footers, and custom attributes; Support a chain style like jquery, it is very convenient for programming development.
Compared to Excel, open source Operations Doc documents less components, this component can barely meet some basic functions. Encountered some advanced, the pit is still a lot. But overall, general support is the first step, the project is currently in the update, look forward to more perfect. In 2013, I wrote an article about basic use: "Original" open source Word read and write component docx introduction and Getting Started
Official website: http://docx.codeplex.com/ 9.PDF processing module Pdfsharp
Generate PDF file format documents, we must have thought, many people project also certainly used, methods, components must have a lot. But. NET Platform for free open source is not much, the best use should be itextpdf, but others are non-commercial free, so we exclude it. Look at the free, this pdfsharp is now relatively perfect, but also continue to update. Support features are:
can be used. NET programming language to create PDF documents dynamically,
It's easy to use the object model to build documents,
Rewrite the design and write code all in C #,
You can generate PDF files and display them on a form or print,
Using the same source file, you can modify, merge, or split the PDF file,
You can control the transparency of the picture, embed the font, and so on. Support is overall comprehensive, but not personally tested.
Official website: http://www.pdfsharp.net/ 10.MigraDoc Document Builder
Migradoc is a. NET platform open source document Builder that supports almost all word processing functions. You just need to add paragraphs, tables, or charts to sections, use bookmarks to create links, table contents, indexes, and more. Migradoc is automatically paginated and layout, and can generate Pdf,xps and RTF document formats. Overall, it is a simpler type of generic document generation tool. Its official website is together with Pdfsharp and is currently in the process of being updated.
Official website: http://www.pdfsharp.net/ 11.PdfReport reporting Tools
Pdfreport is a report engine that supports Code-first, based on the Itextsharp and epplus of open source projects. Support. NET 3.5 above to see a picture of the project:
Official website: http://pdfreport.codeplex.com/ 12. File Variance comparison Diffplex
Diffplex is an open source C # text diff software. supports such environments as. NET 4.0, Silverlight 5.0, Windows 8.0, Windows Phone 8.0, Windows Phone Appx 8.1. As shown in the following illustration:
Official website: Https://github.com/mmanela/diffplex 13.ReportGenerator
Reportgenerator can convert Opencover, partcover, Visual Studio, or ncover-generated XML reports to a more readable format. The above tools are code coverage analysis tools. The converted report has the following format:
1.HTML, Htmlsummary
2.XML, Xmlsummary
3.Latex, Latexsummary
4.TextSummary
5.Custom reports
This component has been continuously updated, for those who specialize in testing should have some help, have also seen the article use this component to show the analysis of the report, but do not understand, not to delve into.
Official website: https://github.com/danielpalme/ReportGenerator 14.BusyReports
Busyreports is a very convenient application for generating reports from the SSRS Web service. Busyreports provides a GUI interface for easy configuration of report parameters, email, file paths, and more. These configuration information is stored in 4 easily editable tables. This component is similar to SQL Server data-driven subscriptions, but some of these restrictions are removed. This component is currently being updated. Look at the GUI configuration interface below:
Official website: http://busyreports.codeplex.com/ 15.Seal
Seal should be the best of the above, the most commonly used one. It provides a complete schema to generate reports from any other database. The product is mainly focused on easy installation and report design, once installed, the report can be established and published soon. This component is completely open source and is written in the C # language. Its main characteristics are that 1. Dynamic SQL data Source: You can use SQL or let the seal engine build dynamic SQL to query the database, 2. Local PivotTable report: Simple drag-and-drop elements directly in the PivotTable, and display them in the reports, also support HTML5 charts, etc., go to the official website to see, Here are 2 screenshots of report Design and report results:
Report results:
Official website: http://sealreport.codeplex.com/