如何将我的Aspx网页转换为Microsoft Excel工作表... [英] How Do I Convert My Aspx Webpage To A Microsoft Excel Sheet ...
本文介绍了如何将我的Aspx网页转换为Microsoft Excel工作表...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Microsoft Visual Studio 2010,Sql Server 2008.
请帮助我...我的页面有一个表,一个 Gridview
和一个图像
。
I'm Using Microsoft Visual Studio 2010, Sql Server 2008.
Please Help Me...My Page Has One Table,One Gridview
And An Image
.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoicePDF.aspx.cs" Inherits="Hotel.InvoicePDF" EnableEventValidation="false"%>
<!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 runat="server">
<title></title>
<%-- <style type="text/css">
.style1
{
width: 100%;
height: 440px;
}
.style7
{
height: 183px;
width: 405px;
}
.style8
{
height: 183px;
}
.style9
{
height: 188px;
width: 405px;
}
.style10
{
height: 188px;
}
.style11
{
width: 100%;
}
.style12
{
color: #FF3300;
}
.style13
{
color: #6666FF;
}
.style14
{
color: #808080;
}
</style>--%>
<%-- <style type="text/css">
.style1
{
height: 215px;
}
.style3
{
}
.style5
{
height: 199px;
width: 262px;
}
.style6
{
height: 122px;
width: 262px;
}
.style7
{
height: 24px;
width: 462px;
}
.style8
{
height: 7px;
width: 262px;
}
</style>--%>
</head>
<form id="form1" runat="server">
<div align="center">
<img src = "http://www.hexcodetechnologies.com/images/logo.gif"
style="width: 315px" /><br />
<table class="style1" bgcolor="White" frame="border">
style="border: thick solid #000000;">
<tr>
<td class="style5" valign="top" align="left">
<br />
Our Address<br />
<br />
<asp:Label ID="Label9" runat="server"
Text="Regus Times Square,unit 1,level2,B Wing">
<br />
<asp:Label ID="Label10" runat="server" Text="Andheri Kurla Road, Andheri (E)">
<br />
<asp:Label ID="Label11" runat="server" Text="Mumbai 400059">
<br />
<asp:Label ID="Label12" runat="server"
Text="E-mail:sales-in@hexcodetechnologies.com">
<br />
<br />
</td>
<td align="justify" class="style3" valign="top" rowspan="2">
<asp:Label ID="Label1" runat="server" Font-Bold="True"
style="position: relative" Text="Date :">
<asp:TextBox ID="TextBox2" runat="server" Height="24px" TextMode="MultiLine"
Width="165px">
<br />
<br />
<asp:Label ID="Label2" runat="server" Font-Bold="True"
Text="Quote">
<asp:TextBox ID="TextBox3" runat="server" Height="51px" TextMode="MultiLine"
Width="174px">
<br />
<br />
<asp:Label ID="Label3" runat="server" Font-Bold="True" Text="For">
<asp:TextBox ID="TextBox4" runat="server" Height="32px" TextMode="MultiLine"
Width="180px">
<br />
<br />
<br />
<asp:Label ID="Label13" runat="server" Font-Bold="True" Text="Invoice ID">
<asp:TextBox ID="TextBox9" runat="server" TextMode="MultiLine">
<br />
</td>
</tr>
<tr>
<td class="style6" valign="top" align="left">
<asp:Label ID="Label4" runat="server" Font-Bold="True" Text="Bill To.">
<br />
<br />
<asp:TextBox ID="TextBox7" runat="server" Font-Bold="True" TextMode="MultiLine">
<br />
<asp:TextBox ID="TextBox8" runat="server" Font-Bold="True" TextMode="MultiLine">
<br />
<br />
</td>
</tr>
<tr>
<td class="style7" valign="top" colspan="2">
<asp:GridView ID="GridView1" runat="server"
style="position: relative; top: -1px; left: 11px" Width="798px"
>
</td>
</tr>
<tr>
<td class="style7" valign="top" align="center" colspan="2">
<br />
<asp:Label ID="Label5" runat="server" Font-Bold="True"
Text="Total Duration for completion of project">
<asp:TextBox ID="TextBox6" runat="server" Height="25px" Width="52px" Font-Bold="True"
TextMode="MultiLine">30
<asp:Label ID="Label6" runat="server" Font-Bold="True" Text="Days">
<br />
<br />
<asp:Label ID="Label7" runat="server" Font-Bold="True"
Text="Full payment after completion of project and before hosting the website">
<br />
<br />
<asp:Label ID="Label8" runat="server" Font-Bold="True"
Text="THANK YOU FOR YOUR BUSINESS!">
<br />
<br />
<br />
<table class="style11">
<tr>
<td align="center" bgcolor="White" valign="middle">
<span class="style1">HexCode Technologies Pvt. Ltd. </span>
<br class="style1" />
<span class="style1">P-34/1 Dr. A K Pal Road Extn., Kolkata 700034
India </span>
<br class="style1" />
<span class="style1">Tel: +91 33 2348 8502</span></td>
</tr>
<tr>
<td align="center" bgcolor="White" valign="middle">
</td>
</tr>
</table>
<br />
</td>
</tr>
<tr>
<td class="style7" valign="top" align="center" colspan="2">
<asp:Button ID="btnExport" runat="server" Text="Convert this into PDF" BorderColor="#3366CC"
BorderStyle="Inset" BorderWidth="5px" Font-Bold="False"
style="font-family: Stencil"
onclick="btnExport_Click" />
</td>
</tr>
</table>
<br />
<br />
<br />
<br />
</div>
<div style="font-family:Arial" align="right">
</div>
<div>
</div>
<div>
</div>
</form>
</html>
[Edit member=\"Tadit\"]
Added pre
tags.
[/Edit]
推荐答案
check this
Export HTML table to Excel With CSS[^]
check this
Export HTML table to Excel With CSS[^]
这篇关于如何将我的Aspx网页转换为Microsoft Excel工作表...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文