GithubHelp home page GithubHelp logo

carven-1980 / closedxml.report Goto Github PK

View Code? Open in Web Editor NEW

This project forked from closedxml/closedxml.report

0.0 0.0 0.0 3.91 MB

ClosedXML.Report is a tool for report generation with which you can easily export any data from your .NET classes to Excel using a XLSX-template.

Home Page: https://closedxml.github.io/ClosedXML.Report/

License: MIT License

C# 100.00%

closedxml.report's Introduction

ClosedXML.Report

Build status Open Source Helpers NuGet Badge All Contributors

ClosedXML.Report is a tool for report generation and data analysis in .NET applications through the use of Microsoft Excel. It is a .NET-library for report generation Microsoft Excel without requiring Excel to be installed on the machine that's running the code. With ClosedXML.Report, you can easily export any data from your .NET classes to Excel using the XLSX-template.

Excel is an excellent alternative to common report generators, and using Excel’s built-in features can make your reports much more responsive. Use ClosedXML.Report as a tool for generating files of Excel. Then use Excel visual instruments: formatting (including conditional formatting), AutoFilter, Pivot tables to construct a versatile data analysis system. With ClosedXML.Report, you can move a lot of report programming and tuning into Excel. ClosedXML.Report templates are simple and our algorithms are fast – we carefully count every millisecond – so you waste less time on routine report programming and get surprisingly fast results. If you want to master such a versatile tool as Excel – ClosedXML.Report is an excellent choice. Furthermore, ClosedXML.Report doesn’t operate with the usual concepts of band-oriented report tools: Footer, Header, and Detail. So you get a much greater degree of freedom in report construction and design, and the easiest possible integration of .NET and Microsoft Excel.

For more information see the wiki

Install ClosedXML.Report via NuGet

If you want to include ClosedXML.Report in your project, you can install it directly from NuGet

To install ClosedXML.Report, run the following command in the Package Manager Console

PM> Install-Package ClosedXML.Report

or if you have a signed assembly, then use:

PM> Install-Package ClosedXML.Report.Signed

Features

  • Copying cell formatting
  • Propagation conditional formatting
  • Vertical and horizontal tables and subranges
  • Ability to implement Excel formulas
  • Using dynamically calculated formulas with the syntax of C # and Linq
  • Operations with tabular data: sorting, grouping, total functions.
  • Pivot tables
  • Subranges

How to use?

To create a report you must first create a report template. You can apply any formatting to any workbook cells, insert pictures, and modify any of the parameters of the workbook itself. In this example, we have turned off the zero values display and hidden the gridlines. ClosedXML.Report will preserve all changes to the template.

Template

template1

Code

    protected void Report()
    {
        const string outputFile = @".\Output\report.xlsx";
        var template = new XLTemplate(@".\Templates\report.xlsx");

        using (var db = new DbDemos())
        {
            var cust = db.customers.LoadWith(c => c.Orders).First();
            template.AddVariable(cust);
            template.Generate();
        }

        template.SaveAs(outputFile);

        //Show report
        Process.Start(new ProcessStartInfo(outputFile) { UseShellExecute = true });
    }

Result

result1

For more information see the wiki and tests

Credits

  • Afalinasoft team with their XLReport for the idea
  • ClosedXML team for a great library
  • Logo design by @Tobaloidee

Contributors

Thanks goes to these wonderful people (emoji key):


Rozhkov Alexey

💻 📖 👀

Aleksei

💻 🌍 👀 🚇

Francois Botha

📦

tobaloidee

🎨

This project follows the all-contributors specification. Contributions of any kind welcome!

closedxml.report's People

Contributors

b0bi79 avatar pankraty avatar dependabot[bot] avatar igitur avatar erestor avatar makeprojectgreatagain avatar tobaloidee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.