我使用PHPExcel库根据mysql查询创建的表生成excel文件。我使用来自不同查询的单个数据创建了多个选项卡。
我需要将所有标签(工作表)中的所有单元格中的数据对齐到中心。
这是我的代码:
$mysql_xls = new MySqlExcelBuilder($mysql_db,$mysql_user,$mysql_pass);
// Add the SQL statements to the spread sheet
$tab_name = "tabname";
$mysql_xls->add_page($tab_name,$sql_statement,NUL
我使用的是PHPExcel 1.8.0,我使用eexcelview和tlbexcelview作为excel和csv下载网格视图,它工作得很好。但是当我尝试以PDF格式下载时,它没有功能。首先,我得到了一个错误:
PDF Rendering library has not been defined.
然后,在阅读了一些博客之后,我知道我必须在PHPExcel中更改PHPExcel,并让它知道我必须使用哪个提供者。因此,我在settings.php中更改了这段代码:
/**
* Name of the external Library used for rendering PDF files
我正在尝试用PHPExcel读取XLSX表,并将其内容提供给一个MySQL表。
我的问题是,在读取XLSX时,我收到以下错误消息:
Fatal error: Uncaught exception 'Exception' with message 'Cell coordinate must not be absolute.' in C:\Program Files\EasyPHP-5.3.3\www\alliance_run\phpexcel\Classes\PHPExcel\Worksheet.php:954 Stack trace: #0 C:\Program
背景
在我的应用程序中使用PHPExcel的IOFactory有问题。如果我想从头开始生成excel文档,我的PHPExcel助手就能工作(我的应用程序每周创建大约20个excel表单,没有问题)。
你为什么需要它?
我现在需要组合一些纸张(上传和生成到一个普通的工作表,然后发送给谁-任何时候。问题是所有的纸张都是由不同的人生成的。所以他们把所有这些床单上传到应用程序中,然后将这些床单组合在一起并发送出去。
,那有什么问题吗?
在我的PHPExcelHelper.php文件中,我添加了以下函数:
public function createMasterFile($ExcelFile) {
我需要从excel导入数据,我决定使用PHPExcel,但当我在我的网站上需要它时,出现了几个警告:
Warning:
include_once(PHPExcel\Shared\ZipStreamWrapper.php) [<a href='function.include-once'>function.include-once</a>]:
failed to open stream: No such file or directory in D:\www\LearningCenter\library\Zend\Loader.ph
我想从我的mysql数据库中导出一些数据到excel文件。我使用PHPExcel库来做这件事。我有一个这样的代码:
include 'PHPExcel/PHPExcel.php';
include 'config.php' //here I connect to db
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
$sheet = $objPHPExcel->getActiveSheet();
$r = mysql_fetch_array(mysql_quer
我正在尝试使用PHPExcel从数据库中获取表的字段名。
但是,我说错了
mysql_field_name()期望参数2是长的,在第42行的C:\xampp\htdocs\phpexcelsample\download.php中给出的字符串
我想我漏掉了什么..。你能给我一些如何得到字段名的提示吗?
这是我的密码:
<?php
$dbhost= "localhost"; //your MySQL Server
$dbuser = "root"; //your MySQL User Name
$dbpass = ""; /
我使用PHPExcel在最终用户单击“生成excel文件”按钮后生成一个excel文件。此按钮会为客户打开一个excel文件,并显示数据。到目前为止,我已经有了这段代码,但目前它只能打开一个没有excel文件的空白页面。有人能告诉我我哪里做错了吗?我猜我没有正确地连接到数据库..
<?php
$dbhost= "mysql"; //your MySQL Server
$dbuser = "survey"; //your MySQL User Name
$dbpass = "password"; //your MySQL Passwor
每当我试图保存模型而不使用post表单,但直接从excel文件中获取数据并将其分配给模型属性时,我就会得到这个错误(致命错误:类'CModelEvent‘’没有找到),如下所示:
public function actionImportFile() {
if (isset($_POST['User'])) {
Yii::import('application.extensions.yii-phpexcel.PHPExcel', true);
$objPHPExcel = PHPExce
在php.ini中,内存限制设置为128米,我所做的只是上传一个130 in大小的Excel2007表格,它只包含100行。apache日志中的错误消息如下:
[Mon May 09 11:09:00 2011] [error] [client 192.168.1.71] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /usr/share/phpmyadmin/libraries/PHPExcel/PHPExcel/Cell.php on li