$objPHPExcel = new PHPExcel();默认一个sheet$objPHPExcel->getProperties()->setCreator("test") ->setLastModifiedBy("test") ...
分类:
Web程序 时间:
2015-08-11 09:58:29
阅读次数:
137
thinkphp之Excel的导出 Excel的导出步骤: 1.下载phpexcel包,置于以下thinkphp框架路径。 内部还有一个文件夹和一个php文件 2.创建excel对象并设置excel对象的属性(ExportALLAction.class.php?); 3.设置exc...
分类:
Web程序 时间:
2015-08-07 22:27:53
阅读次数:
146
将csv文件或者excel表格导入数据库的方法:
Excel数据直接导入mysql会需要用到phpexcel开源类,详情使用可以参考这篇文章~
http://www.cnblogs.com/freespider/p/3284828.html
本文使用的方法是:
Excel ——> CSV——>MySql
首先将excel另存为csv文件,然后开始分析数据。
代码如下:
<?PHP...
分类:
数据库 时间:
2015-08-05 20:28:36
阅读次数:
236
//excel日期转换函数
function?excelTime($date,?$time?=?false)?{
?if(function_exists(‘GregorianToJD‘)){
??if?(is_numeric(?$date?))?{
???$jd?=?GregorianToJD(?1,?1,?1970?);
???$...
分类:
Web程序 时间:
2015-08-03 15:01:59
阅读次数:
143
PHPexcel官方下载以后,放入Yii的protected\extensions\phpexcel下面try { spl_autoload_unregister(array('YiiBase', 'autoload')); $phpExcelPath = Yii::ge...
分类:
Web程序 时间:
2015-07-31 17:42:51
阅读次数:
137
save("xxx.xlsx");//直接输出到浏览器$objWriter = new PHPExcel_Writer_Excel5($objPHPExcel);header("Pragma: public");header("Expires: 0");header("Cache-Control:m...
分类:
Web程序 时间:
2015-07-29 22:41:39
阅读次数:
227
php里的文字需要用mb_convert_encoding($string, 'utf-8', 'gbk')转换一下,要不然会出现乱码的情况$objPHPExcel = new PHPExcel(); $objPHPExcel->getProperties()->setTitl...
分类:
Web程序 时间:
2015-07-29 13:37:44
阅读次数:
163
云智慧(北京)科技有限公司刘建凡应用场景:很多时候需要把数据转成EXCEL表格形式下载下来,方便用户拿去分析。传统的EXCEL做法是直接通过header头,结合table表格,转为EXCEL文档,但是这样不够灵活,不能有多个页签,不利于后期维护和扩展。云智慧——监控宝产品中,数据的..
分类:
Web程序 时间:
2015-07-28 14:49:32
阅读次数:
216
1.PHPExcel类中读取Excel文件相关函数和使用方法插件官网:http://phpexcel.codeplex.com/canRead($filePath)){ $PHPReader = new PHPExcel_Reader_Excel...
分类:
Web程序 时间:
2015-07-26 19:12:01
阅读次数:
136
//参数初始化
????????$filePath?=?‘‘;
????????if?($_FILES["file"]["error"]?>?0)?{
????????????returnJSON(ERROR_INVALID,?$_FILES["file"]["error"]);
????????...
分类:
Web程序 时间:
2015-07-17 21:11:02
阅读次数:
130