phpexcel

PHPExcel Chart Axis Options set Minimum

牧云@^-^@ 提交于 2020-01-04 03:16:28
问题 I'm having an issue with PHPExcel that it is not PHPExcel's fault. In a graph, the values being presented are very large, so since the default setting for the axis options for Minimum is Automatic, Excel is deciding to use a minimum value for the Y axis of 156,000. The issue can be "Fixed" in Excel by going into the Axis format option and setting a Fixed value of 0 for the minimum of that axis. So I've been trying to figure out if you can set this option from within PHPExcel, but can't figure

PhpSpreadsheet is corrupting files

感情迁移 提交于 2020-01-03 17:51:08
问题 I am using PhpSpreadsheet to modify an existing file and send it to the browser, but every time I download the file excel gives me the following error: We found a problem with some content in filename.xlsx. Do you want us to try and recover as much as we can? If you trust the source of this workbook, click Yes. I have stripped back everything to the following code. The template file that I am opening is a brand new excel file, with no edits made to it (to avoid the potential that the error

Reading multiple files with PHPExcel

荒凉一梦 提交于 2020-01-03 17:35:11
问题 I just recently started using this library (the one from CodePlex), but I ran into some issues. My goal is to use it so I can process some data from multiple Excel files, and send such data to a database, per file. I'm doing something like: foreach( $file_list as $file ) { $book = PHPExcel_IOFactory::load( $path . $file ); } So, inside the foreach I'm (for now) just showing the data to the user, but after five files, I get a memory error: Fatal error: Allowed memory size of 33554432 bytes

Allowed memory size of 134217728 bytes exhausted in PhpExcel [duplicate]

混江龙づ霸主 提交于 2020-01-03 04:40:11
问题 This question already has answers here : PHPExcel runs out of 256, 512 and also 1024MB of RAM (7 answers) Closed 6 years ago . i export file xlsx using phpexcel, data have 32 cols and many rows. Each day data increase so data will very big. This is my code: $filename="data.xlsx"; $cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp; $cacheSettings = array( 'memoryCacheSize' => '128MB'); PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); ini_set('max

Class 'CI_Excel' not found

我的未来我决定 提交于 2020-01-03 04:28:06
问题 When I load the library of excel I got this error. I follow everything in this Tutorial and still got some error Im using codeigniter framework. Class 'CI_Excel' not found in /var/www/html/warehouse/system/core/Common.php on line 196 this is my controller class Dashboard extends CI_Controller { public function __construct(){ parent::__construct(); $this->load->library('excel'); $this->load->model('dashboard_model'); } public function download(){ $this->excel->setActiveSheetIndex(0); $this-

Find highest column in row PHPExcel

↘锁芯ラ 提交于 2020-01-03 03:41:21
问题 I am triying to read all columns from an excel file but its number is variable depending on the row. For example: Row1, col2, col3, col4 Row2, col2,col3 Row3,col2,col3,col4,col5,col6 I am trying to do something like: for ($row = 1; $row < 2; $row++){ $rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row, NULL, TRUE, FALSE); echo print_r($rowData[0][0]); echo "<br>"; $list_of_coordinates = ""; $i = 1; //echo print_r($rowData[$row][$i+1]); while($rowData[0][$i+1] != ""){ /*

composer安装第三方的库packagist.org(laravel框架引入第三方库)

牧云@^-^@ 提交于 2020-01-02 21:01:11
建立composer.json composer require phpoffice/phpexcel //安装一个excel扩展库 composer require gregwar/captcha //安装一个验证码库 命令完成之后composer.json文件中就自动多个信息 (软件包也就下载在vendor文件中) 在"require":{ "gregwar/captcha":"~1.1", } "require": { "php": ">=5.6.4", "laravel/framework": "5.4.*", "laravel/tinker": "~1.0", "phpoffice/phpexcel": "^1.8" }, 这时候类已经下载到指定位置了,可能需要自动加载(我测试不添加自动加载,类是用不了的) 下来配置下自动加载(两种自动加载) "autoload": { "classmap": [ "database", "vendor/phpoffice/phpexcel/Classes/PHPExcel.php" ], "psr-4": { "App\\": "app/" } }, 然后类就可以用了 $objPHPExcel = new \PHPExcel();//用这个类没出现错误 Composer按照四种规范来加载文件: psr-4 psr-0

set footer in all printed pages using phpexcel

不羁的心 提交于 2020-01-02 08:48:07
问题 What I want to achieve: I am currently using PHPExcel and I want to display the filename and the page numbers in all the right hand side footer of all the printed pages . Basically the format should be filename.xlsx Page 1 / 2 where filename.xlsx is the file name and 1 is the current page number and 2 is the total page number What I have tried: I have tried the following code: $this->objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&R&F'); $this->objPHPExcel->getActiveSheet()-

Fatal error in Autoloader.php on line 34 phpExcel

别来无恙 提交于 2020-01-01 10:53:11
问题 I want to use phpExcel, but when run the script I get this error: Fatal error: Uncaught exception 'PHPExcel_Exception' with message 'Multibyte function overloading in PHP must be disabled for string functions (2).' in D:\Apache\htdocs\phpExcel\Classes\PHPExcel\Autoloader.php:34 Stack trace: #0 D:\Apache\htdocs\phpExcel\Classes\PHPExcel.php(32): require() #1 D:\Apache\htdocs\phpExcel\index.php(19): include('D:\Apache\htdoc...') #2 {main} thrown in D:\Apache\htdocs\phpExcel\Classes\PHPExcel

PHPExcel how to apply alignment for the whole document created from mysql table

对着背影说爱祢 提交于 2020-01-01 08:39:30
问题 I used PHPExcel library to generate excel files based on the table created by the mysql query. I created multiple tabs with individual data from different queries. I need to align the data in the all the cells in all the tabs (worksheets) to center. This is my code: $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,NULL,'A',1); $phpExcel = $mysql_xls-