phpexcel

'The filename 062014.xlsx is not recognised as an OLE file'

走远了吗. 提交于 2021-02-18 21:32:27
问题 I am working on a complex program that deals with Excel, so I am using PHPExcel to search and edit the Excel file from a browser. My problem comes in the editing portion of the program, so I wrote a basic program to edit the existing Excel page. It seems that PHPExcel does not recognize the file created in Excel as an Excel file. This is done on my own server with an Excel page I created with Excel. The filename is 062014.xlsx. On the HTML side I named the text boxes C3, D3, and E3, so their

How to set range of separate cells in DataSeriesValues PHPExcel RadarChart

北城以北 提交于 2021-02-10 16:24:29
问题 I can't make radar chart with PHPExcel. I need to add to DataSeriesValues range of separate cells $xAxisTickValues = [ new \PHPExcel_Chart_DataSeriesValues('String', $sn.'!$B$5', NULL, 1), new \PHPExcel_Chart_DataSeriesValues('String', $sn.'!$B$10', NULL, 1), new \PHPExcel_Chart_DataSeriesValues('String', $sn.'!$B$14', NULL, 1), new \PHPExcel_Chart_DataSeriesValues('String', $sn.'!$B$17', NULL, 1), ]; //This works fine $xAxisTickValues = [ new \PHPExcel_Chart_DataSeriesValues('String', $sn.'!

Read excel sheet containing merged cells using PHPExcel

不打扰是莪最后的温柔 提交于 2021-02-08 07:51:30
问题 I want to read an excel sheet completely and using AJAX send each row to another page for processing. So I have used the following code for converting the excel sheet data into JSON array(Reference PHPExcel example provided in Library): <?php error_reporting(E_ALL); set_time_limit(0); date_default_timezone_set('Asia/Kolkata'); set_include_path(get_include_path() . PATH_SEPARATOR . 'PHPExcel-1.8/Classes/'); require_once 'PHPExcel/IOFactory.php'; $inputFileType = PHPExcel_IOFactory::identify(

Read excel sheet containing merged cells using PHPExcel

六月ゝ 毕业季﹏ 提交于 2021-02-08 07:51:27
问题 I want to read an excel sheet completely and using AJAX send each row to another page for processing. So I have used the following code for converting the excel sheet data into JSON array(Reference PHPExcel example provided in Library): <?php error_reporting(E_ALL); set_time_limit(0); date_default_timezone_set('Asia/Kolkata'); set_include_path(get_include_path() . PATH_SEPARATOR . 'PHPExcel-1.8/Classes/'); require_once 'PHPExcel/IOFactory.php'; $inputFileType = PHPExcel_IOFactory::identify(

Add Pictures to comments in PhpSpreadsheet

梦想与她 提交于 2021-01-29 15:15:33
问题 I have a comment in PhpSpreadsheet and I want to add a backgroundpicture to it. The comment is created like this: $spreadsheet->getActiveSheet()->getComment($cell)->getText()->createTextRun('Test text'); But there is nothing in the documentation about how to add a backgroundpicture to it. 回答1: I was able to solve my issue with a (bad, but working) workaround. It seems that PHPSpreadsheet is not able (yet) to create a backgroundpicture to a comment, maybe PHPSpreadsheet can do it in the future

Laravel: how to access a file in the local disk? - File does not exist

被刻印的时光 ゝ 提交于 2021-01-29 04:32:59
问题 I'm trying to edit an excel file after uploading it in laravel. the file is uploaded to local disk, so no one can access it from the public. Filesystems.php 'local' => [ 'driver' => 'local', 'root' => storage_path('app') Routes.php Route::get('test',function() { // Create new PHPExcel object $objPHPExcel = new PHPExcel(); $objPHPExcel = PHPExcel_IOFactory::load(Storage::disk('local')->url('margin/analyser/0IGkQQgmGXkHrV9ISnBTrGyZFUPfjz3cWJbLGbDN.xlsx')); $objPHPExcel->setActiveSheetIndex(0);

How to Download Excel file in Angular using File Saver

老子叫甜甜 提交于 2021-01-28 17:50:59
问题 I had created post form in PHP where on clicking the button it was downloading an excel file and I had some form data also posted to the URL and file used to download successfully with plain HTML and submit form In PHP this is function triggered when the form is posted to the file public function downloadExcel($fileName = '', $addTimeStamp = true) { $fileName = (!$fileName) ? 'excel_download' : preg_replace('/\s+/', '_', $fileName); if ($addTimeStamp) { $fileName .= date('_d_m_Y_H_i_s'); }

How to read multiple worksheet from a single excel file in php?

北慕城南 提交于 2021-01-18 19:24:17
问题 I have an excel sheet having three worksheets, I am having trouble in fetching records from second worksheet. All three worksheet is having different kind of records and with different fields, I try to google it but couldn't find a solution. 回答1: You can refer, http://phpexcel.codeplex.com/ This is good project developed for excel reader and writer. You can use it for your project. It has all necessary methods that are required for excel. 回答2: /** Include path **/ set_include_path(get_include

How to read multiple worksheet from a single excel file in php?

牧云@^-^@ 提交于 2021-01-18 19:13:50
问题 I have an excel sheet having three worksheets, I am having trouble in fetching records from second worksheet. All three worksheet is having different kind of records and with different fields, I try to google it but couldn't find a solution. 回答1: You can refer, http://phpexcel.codeplex.com/ This is good project developed for excel reader and writer. You can use it for your project. It has all necessary methods that are required for excel. 回答2: /** Include path **/ set_include_path(get_include

Using PHPExcel to make automatic generated excel files

a 夏天 提交于 2020-12-27 19:05:49
问题 I want to have my excel file filled with some data which I get from my database, for example the name and age of someone. Say there are 10 people in my database. I want those 10 people in my Excel file. So basically, you would get: NAME AGE Person1 20 years Person2 25 years And so on. I know how to set the NAME and AGE stuff, but how would I go about looping the data and writing it inside the excel file? I couldn't find anything about it in PHPExcel's documentation. This is my MySQL: $query =