通过PHP操作Excel文件 [英] Excel file manipulation via PHP
本文介绍了通过PHP操作Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Excel文件可以用PHP处理吗?我可以在某些单元格中插入某些值吗?
Can an excel file be manipulated with PHP? Can I insert certain value in certain cell?
推荐答案
请参阅: http://phpexcel.codeplex.com/
它具有您可能需要的所有功能.
That has all the functions you could ever need.
示例:
4.5.1.按坐标设置单元格值可以使用工作表的setCellValue方法完成按坐标设置单元格值.
4.5.1. Setting a cell value by coordinate Setting a cell value by coordinate can be done using the worksheet’s setCellValue method.
$objReader = new PHPExcel_Reader_Excel2007();
$objPHPExcel = $objReader->load("05featuredemo.xlsx");
$objPHPExcel->getActiveSheet()->setCellValue('B8', 'Some value');
这篇关于通过PHP操作Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文