Create and Export
Excel sheet using NPOI and C#
Here we create excel sheet using NPOI dll in excel we
download expenditure for all months and also create formulae for Total
expenditure of all months and also calculate total expense for each month for
all expenditure which will be displayed at the bottom. If we changes any value
of expenditure then total will also change for all months total and all
expenditure total for a month.
First download NPOI dll from http://npoi.codeplex.com/releases
and add reference in project.
Default.apx
- <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
- CodeFile="Default.aspx.cs" Inherits="_Default" %>
- <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
- </asp:Content>
- <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
- <h2>
- Create and Export Excel Sheet using NPOI and C#
- </h2>
- <p>
- <asp:Button ID="btnExport" runat="server" Text="Export"
- onclick="btnExport_Click" />
- </p>
- </asp:Content>
Default.aspx.cs

Join the conversation! Your thoughts help the community grow.