我想使用PHP下载包含三张表的excel文件。谁能帮我?
答案 0 :(得分:1)
如果我理解正确,您需要从PHP生成Excel文件?
如果是这样,请查看名为Spreadsheet_Excel_Writer
在introduction of the manual中,有一个例子看起来有点像你想要实现的目标:
<?php
require_once 'Spreadsheet/Excel/Writer.php';
// Creating a workbook
$workbook = new Spreadsheet_Excel_Writer();
// sending HTTP headers
$workbook->send('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
$workbook->close();
?>
它可以帮助您做您想要的事情: - )
如果我不明白,你只需要阅读一个excel文件......好吧:
PHP-ExcelReader
可能会做到这一点答案 1 :(得分:0)