草庐IT

PHPExcel_Writer_Exception

全部标签

php - codeigniter 3.x 中的 MongoDB\Driver\Exception\InvalidArgumentException

将CI2.x中的项目迁移到3.x后,在我使用mongodb的地方显示以下错误,这在codeigniter版本2中运行良好,Message:FailedtoparseMongoDBURI:'mongodb://'.InvalidhoststringinURI.数据库配置//Generallywillbelocalhostifyou'requeryingfromthemachinethatMongoisinstalledon$config['mongo_host']="localhost";//$config['mongo_host']="xxxxxxxxx.compute.amazona

linux - std::exception(const char*) 非标准构造函数的替代方法

我的VisualC++代码使用接受字符串的std::exception构造函数,我正在尝试将代码移植到Linux/G++。我应该使用什么异常类? 最佳答案 MicrosoftVisualC++的std::exception(constchar*)构造函数是非标准的。在C++标准库中,std::exception有一个constchar*what()const方法,它不提供指定字符串的方法,除非通过覆盖。您应该重写代码以使用std::runtime_error或来自的其他类别之一作为备选。当然,不需要更改捕获std::exceptio

php - 未捕获的异常 'Zend_Log_Exception' 消息文件。无法使用模式 "a"打开日志

我遇到了以下错误:Uncaughtexception'Zend_Log_Exception'withmessagefile.logcannotbeopenedwithmode"a"在我的Bootstrap中,我有以下代码:$logfile=PROJECT_PATH.DIRECTORY_SEPARATOR.'/tmp/logs/'.$config->app->logfile.'.log';if(!file_exists($logfile)){$fp=fopen($logfile,'a');fclose($fp);}$redacteur=newZend_Log_Writer_Stream(

php - 如何更改使用 phpexcel 生成的折线图的样式?

我正在使用Githublibrary中的示例生成折线图.我想要的是为图表中的每条线设置一些自定义样式的选项,就像我们在Excel工作表中手动做的那样:选择图表中的线,设置数据系列格式,然后:标记选项>无线条样式>宽度>2.5pt(默认为1pt)线型>平滑线如何为折线图中生成的线设置以上三个选项?到目前为止,这是我为图表设置布局和数据系列的代码:$series=newPHPExcel_Chart_DataSeries(PHPExcel_Chart_DataSeries::TYPE_LINECHART,PHPExcel_Chart_DataSeries::GROUPING_STANDARD

PHP SoapClient : SoapFault exception Could not connect to host

使用此代码我发出soap请求$client=newSoapClient('http://example.com/soap/wsdl');try{$result=$client->myMethod();}catch(Exception$e){echo$e->getMessage();}有时(十分之一)会引发异常:SoapFaultexception:[HTTP]Couldnotconnecttohost我的尝试1)我寻找解决方案,然后Iread这个问题可能是由wsdl缓存引起的,我在php.ini中禁用了它:soap.wsdl_cache_enabled=0soap.wsdl_cache

PHPExcel 获取相对于给定列的列名

使用PHPExcel,是否可以获取位于左侧或右侧X列的列的名称?例如,给定列BZ,我想返回列名CB或BX。(向右或向左2个)谢谢 最佳答案 PHPExcel中已经内置了一些函数来帮助您执行此操作$adjustment=-2;$currentColumn='BZ';$columnIndex=PHPExcel_Cell::columnIndexFromString($currentColumn);$adjustedColumnIndex=$columnIndex+$adjustment;$adjustedColumn=PHPExcel_

PHPExcel 检查工作表是否存在

我正在使用phpExcel,但我找不到任何东西来检查工作表是否存在。我想要完成的是这样的:if(!$excel->sheetExists(1)){$excel->createSheet(1);$sheet=$excel->setSheet(1);}//Dosomestuffwiththesheet所以。我的问题:如何检查工作表是否存在?编辑这行得通吗?try{$sheet=$this->excel->setActiveSheetIndex(1);}catch(Exception$e){$excel->createSheet(1);$sheet=$excel->setActiveShee

使用ajax调用PHPExcel下载

App::import('Vendor','PHPExcel/Classes/PHPExcel');$objPHPExcel=newPHPExcel();$objPHPExcel->getActiveSheet()->setTitle('ReceivedMessages');header('Content-Type:application/vnd.ms-excel');$file_name="kpi_form_".date("Y-m-d_H:i:s").".xls";header("Content-Disposition:attachment;filename=$file_name")

php - PHPExcel 和 PhpSpreadsheet 之间的主要区别是什么?

在PHPOffice的项目中有两个项目与电子表格文件格式相关:PHPExcelPHPExcelisalibrarywritteninpurePHPandprovidingasetofclassesthatallowyoutowritetoandreadfromdifferentspreadsheetfileformats,likeExcel(BIFF).xls,Excel2007(OfficeOpenXML).xlsx,CSV,Libre/OpenOfficeCalc.ods,Gnumeric,PDF,HTML,...ThisprojectisbuiltaroundMicrosoft'

php - 设置自动调整列phpExcel

如何让PHPExcel自动创建列宽我不喜欢手动进入并拉伸(stretch)列宽。我看过其他例子,但没有一个对我有用。这是我的代码:$objPHPExcel->setActiveSheetIndex(0);$objPHPExcel->getActiveSheet()->setCellValue('A1',"CompanyName");$objPHPExcel->getActiveSheet()->setCellValue('B1',"CompanyType");$objPHPExcel->getActiveSheet()->setCellValue('C1',"FirstName");$