更新时间:2022-10-17 23:15:37
您好,>
在GridView下方检查到Excel
http://www.codeproject.com/Tips/345914 /Direct-Excel-Export-from-ASP-Net-GridView
http://www.c-sharpcorner.com/UploadFile/DipalChoksi/exportxl_asp2_dc11032006003657AM/export .aspx
现在开始,请在适当的论坛中发布您的问题.您的问题是关于Asp.Net的.
所以将您的问题发布到
forums.asp.net
致谢
Alisha
Hi
Its possible import a excel to grid view??
i try this solution but in the moment where my aplication show's the grid , nothings hapens.
this is the aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="PMESP.CIAF.AP.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="fupArquivo" runat="server" Width="510px" />
<asp:Button ID="btnLerExcel" runat="server" OnClick="btnLerExcel_Click" Text="Ler Excel" /><br />
<div>
<asp:GridView ID="gvExcel" runat="server" CellPadding="4" ForeColor="#333333" ViewStateMode="Enabled"
Width="592px" AutoGenerateColumns="False" AllowPaging="True" BorderStyle="Solid"
HorizontalAlign="Justify" PageSize="50" ShowHeaderWhenEmpty="True">
<RowStyle BackColor="#E3EAEB" />
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:BoundField HeaderText="Nome" ReadOnly="True" />
<asp:BoundField HeaderText="R.E" ReadOnly="True" />
</Columns>
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</div>
</div>
</form>
</body>
</html>
my code behind
using System;so none report errors is show up, but the page still blank....: (
someone help please.
Rafael Soares Desenvolvedor Web
Hi,
Check below GridView to Excel
http://www.codeproject.com/Tips/345914/Direct-Excel-Export-from-ASP-Net-GridView
now onwards Please post your question in proper forum. your question is regarding Asp.Net.
So Post your question in
forums.asp.net
Regards
Alisha