急,帮帮忙:怎么把WEB内容导入现有的EXCEL文件模板 http://agetime.joo.cn/PHPExcel.rar下载这个类,应该可以帮到你的. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpheader("Content-type:application/vnd.ms-excel");header("Content-Disposition:filename=test.xls");这里选出想要的数据?><html><head><meta http-equiv=Content-Type content="text/html; charset=GB2312"><style><!--.xl24 {font-size:20.0pt; font-family:楷体_GB2312, monospace; text-align:center; vertical-align:middle; white-space:normal;}.xl25 {text-align:center; vertical-align:middle; border:.5pt solid windowtext; white-space:normal;}.xl26 {vertical-align:middle; border:.5pt solid windowtext; white-space:normal;}.xl27 {text-align:center; vertical-align:middle; border:.5pt solid windowtext; white-space:normal;}.xl28 {font-family:黑体; text-align:center; vertical-align:middle; border:.5pt solid windowtext; white-space:normal;}.xl29 {text-align:left; vertical-align:middle; border:.5pt solid windowtext; white-space:normal;}--></style></head><body bgcolor="#FFFFFF"><table x:str border=0 cellpadding=0 cellspacing=0 width=960> <col width=60 style='width:45pt'> <col width=300 style='width:225pt'> <col width=100 style='width:75pt'> <col width=120 style='width:90pt'> <col width=100 style='width:75pt'> <col width=120 style='width:90pt'> <col width=80 span=2 style='width:60pt'> <tr height=50> <td colspan=8 height=50 class=xl24 width=960>(2003-12-01) 至 (2003-12-30) 收费统计分析</td> </tr> <tr height=30> <td height=30 class=xl28 width=60>序号</td> <td class=xl28 width=300>客户名称</td> <td class=xl28 width=100>收费项目</td> <td class=xl28 width=120>金额</td> <td class=xl28 width=100>方式</td> <td class=xl28 width=120>完成时间</td> <td class=xl28 width=80>状态</td> <td class=xl28 width=80>业务员</td> </tr><?phpFor($I = 1;$I < 10 ;$I++){?> <tr height=30> <td height=30 class=xl25 width=60 x:num><?=$I?></td> <td class=xl26 width=300>a</td> <td class=xl25 width=100>b</td> <td class=xl26 width=120>c</td> <td class=xl25 width=100>d</td> <td class=xl29 width=120>e</td> <td class=xl27 width=80>f</td> <td class=xl25 width=80x:num>g</td> </tr><?php} ?> <tr height=26> <td height=26 class=xl28>合计</td> <td colspan='2' class=xl26>1元</td> <td height=26 class=xl28>制表时间</td> <td colspan='2' class=xl26><%=Now()%></td> <td height=26 class=xl28>制表人</td> <td class=xl26></td> </tr></table></body></html><input type='button' value='打印' onclick=""window.open('这个文件名,可以传参数','','left=20,top=20,scrollbars=yes,location=no,toolbar=no,menubar=yes,resizable=yes,status=yes')""> http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.php纯php写的Class 你会用就可以了。 <?phprequire_once '../pearlib/Writer.php';// Creating a workbook//$workbook = new Spreadsheet_Excel_Writer();$workbook = new Spreadsheet_Excel_Writer('test.xls');// Creating a worksheet$worksheet =& $workbook->addWorksheet('My first worksheet');// The actual data$worksheet->write(0, 0, 'Name');$worksheet->write(0, 1, 'Age');$worksheet->write(1, 0, 'John Smith');$worksheet->write(1, 1, 30);$worksheet->write(2, 0, 'Johann Schmidt');$worksheet->write(2, 1, 31);$worksheet->write(3, 0, 'Juan Herrera');$worksheet->write(3, 1, 32);// Let's send the file// Creating a worksheet$worksheet =& $workbook->addWorksheet('Second worksheet');// The actual data$worksheet->write(1, 0, 'Name');$worksheet->write(1, 1, 'Age');$worksheet->write(2, 0, 'XXX');$worksheet->write(2, 1, 28);$worksheet->write(3, 0, 'YYY');$worksheet->write(3, 1, 10);$worksheet->write(4, 0, 'Johnny Walker');$worksheet->write(4, 1, 28);$workbook->close();print "Excel Test";?> 百度的搜索拼音联想功能是大致上的原理是怎样的呢 谢谢! 关于文件下载 急smarty大于3并且小于5怎么表达 急!!如何判断是否合法可以解析的XML! sql语句将两个表的内容合并 PHP 中 HTTP头能否用白话解释一下! 紧急求助!!!!大家来看看, MySQL中SET NAMS的作用范围有多大? 请教:关于购物车的安全认证问题 如何在windows下整合apache+php+mysql的较高版本,而不用PHPTriad。 关于框架网页的问题?? 为什么我的session值写不进去?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
这里选出想要的数据
?>
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<style>
<!--
.xl24
{font-size:20.0pt;
font-family:楷体_GB2312, monospace;
text-align:center;
vertical-align:middle;
white-space:normal;}
.xl25
{text-align:center;
vertical-align:middle;
border:.5pt solid windowtext;
white-space:normal;}
.xl26
{vertical-align:middle;
border:.5pt solid windowtext;
white-space:normal;}
.xl27
{text-align:center;
vertical-align:middle;
border:.5pt solid windowtext;
white-space:normal;}
.xl28
{font-family:黑体;
text-align:center;
vertical-align:middle;
border:.5pt solid windowtext;
white-space:normal;}
.xl29
{text-align:left;
vertical-align:middle;
border:.5pt solid windowtext;
white-space:normal;}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<table x:str border=0 cellpadding=0 cellspacing=0 width=960>
<col width=60 style='width:45pt'>
<col width=300 style='width:225pt'>
<col width=100 style='width:75pt'>
<col width=120 style='width:90pt'>
<col width=100 style='width:75pt'>
<col width=120 style='width:90pt'>
<col width=80 span=2 style='width:60pt'>
<tr height=50>
<td colspan=8 height=50 class=xl24 width=960>(2003-12-01) 至 (2003-12-30)
收费统计分析</td>
</tr>
<tr height=30>
<td height=30 class=xl28 width=60>序号</td>
<td class=xl28 width=300>客户名称</td>
<td class=xl28 width=100>收费项目</td>
<td class=xl28 width=120>金额</td>
<td class=xl28 width=100>方式</td>
<td class=xl28 width=120>完成时间</td>
<td class=xl28 width=80>状态</td>
<td class=xl28 width=80>业务员</td>
</tr>
<?php
For($I = 1;$I < 10 ;$I++)
{
?>
<tr height=30>
<td height=30 class=xl25 width=60 x:num><?=$I?></td>
<td class=xl26 width=300>a</td>
<td class=xl25 width=100>b</td>
<td class=xl26 width=120>c</td>
<td class=xl25 width=100>d</td>
<td class=xl29 width=120>e</td>
<td class=xl27 width=80>f</td>
<td class=xl25 width=80x:num>g</td>
</tr>
<?php
}
?>
<tr height=26>
<td height=26 class=xl28>合计</td>
<td colspan='2' class=xl26>1元</td>
<td height=26 class=xl28>制表时间</td>
<td colspan='2' class=xl26><%=Now()%></td>
<td height=26 class=xl28>制表人</td>
<td class=xl26></td>
</tr>
</table>
</body>
</html>
<input type='button' value='打印' onclick=""window.open('这个文件名,可以传参数','','left=20,top=20,scrollbars=yes,location=no,toolbar=no,menubar=yes,resizable=yes,status=yes')"">
纯php写的Class 你会用就可以了。
<?php
require_once '../pearlib/Writer.php';
// Creating a workbook
//$workbook = new Spreadsheet_Excel_Writer();
$workbook = new Spreadsheet_Excel_Writer('test.xls');
// Creating a worksheet
$worksheet =& $workbook->addWorksheet('My first worksheet');
// The actual data
$worksheet->write(0, 0, 'Name');
$worksheet->write(0, 1, 'Age');
$worksheet->write(1, 0, 'John Smith');
$worksheet->write(1, 1, 30);
$worksheet->write(2, 0, 'Johann Schmidt');
$worksheet->write(2, 1, 31);
$worksheet->write(3, 0, 'Juan Herrera');
$worksheet->write(3, 1, 32);
// Let's send the file// Creating a worksheet
$worksheet =& $workbook->addWorksheet('Second worksheet');
// The actual data
$worksheet->write(1, 0, 'Name');
$worksheet->write(1, 1, 'Age');
$worksheet->write(2, 0, 'XXX');
$worksheet->write(2, 1, 28);
$worksheet->write(3, 0, 'YYY');
$worksheet->write(3, 1, 10);
$worksheet->write(4, 0, 'Johnny Walker');
$worksheet->write(4, 1, 28);
$workbook->close();print "Excel Test";
?>