Questions tagged [phpspreadsheet]

PhpSpreadsheet is a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc.

See:

859 questions
0
votes
2 answers

PhpSpreadsheet - Chunk data on multiple sheets

I need to read a xlsx file with 10 sheets, each sheet with about 3K rows. Is there a way to loop each sheet and chunk his rows? Following the examples I'm on this point: public function import($file) { $inputFileType =…
Victor
  • 5,043
  • 3
  • 41
  • 55
0
votes
1 answer

How to setup PhpSpreadsheet in Laravel

I have installed PhpSpreadsheet via composer now need to know the service provider to enter in app.php to use it in my controller.
0
votes
3 answers

phpspreedsheet data coming out corrupt format

Just starting with PHP spreed sheets. But when I save it's creating the file weird, please see the photos attached. I don't understand why it is doing it.... now updated so straight to point with code below...? Thanks in advance for help…
Jonny B'Good
  • 105
  • 2
  • 13
0
votes
2 answers

Unable to convert an excel to pdf using php

I have installed PhpSpreadsheet and dompdf successfully using composer. My requirement is that I need to convert an excel sheet into pdf, I got it working using the default settings, this is the code I have used. use…
Jude Fernandes
  • 7,437
  • 11
  • 53
  • 90
0
votes
1 answer

PhpSpreadsheet could not save to server

I'm trying to use PhpSpreadsheet to write and save excel file to File Server. Here is my code: $path = 'http://192.168.3.81/erpFile/'.time().'.xlsx'; $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet,…
mei
  • 53
  • 1
  • 9
0
votes
1 answer

phpspreadsheet - lines without markers in chart

I am using phpspreadsheet to generate line charts. Almost everything is fine, but I don't get how to change plot style. Here is what I have: function createChart($sheet, $sheetname, $data) { $count = $data["custom"]["count"]; …
amorcian
  • 1
  • 4
0
votes
1 answer

phpspreadsheet sample not working

I installed phpspreadsheet into my project using composer and I was trying to run the samples server by command line. The server was working, also shows the index page and sample links but when I click the sample links it says "The requested…
Sam
  • 195
  • 1
  • 18
0
votes
1 answer

Export .xlsx with PHPSpreadsheet reading a .php file that creates an HTML table

Is it possible to create an .xlsx spreadsheet using PHPSpreadsheet from a .php file that creates an HTML table? The .php file creates an HTML table from both POST and DB values. I'm able to successfully create an .xls file using just php header…
Derek Roberts
  • 31
  • 1
  • 8
0
votes
1 answer

PHP - Converting Array to group duplicates together - phpspreadsheet

I have a csv uploader i'm creating to push to an order api. Using phpSpreadsheets toArray method, i have an array like so: Array ( [0] => Array ( [0] => product_sku [1] => product_qty [2] => shipping_name [3]…
Dan Ruxton
  • 13
  • 9
0
votes
2 answers

PHPSpreadsheet --> How to delete a single image/drawing

I use PHPSpreadsheet to open an Excel-Sheet and exchange an image in cell A27. My actual code doesn't replace the image but add it as overlay to the existing image: $inputFileName = $_SERVER['DOCUMENT_ROOT']."output/test.xlsx"; $spreadsheet =…
Daniel Bäuerlein
  • 149
  • 1
  • 1
  • 12
0
votes
0 answers

Skipping values in importing excel to mysql using PHPSpreadsheet

I am trying to import values from Excel spreadsheet using PHPSpreadsheet composer package. But it keep missing some rows from the excel file. what maybe the cause? The code runs perfectly, and it inserts data in the mysql table. let say i have 50…
Emil Kitua
  • 59
  • 8
0
votes
2 answers

Save charts with PHP Spreadsheet 1.2.1

I am reading an XLSX file as a template and fill out a couple of existing worksheets. Some other worksheet in the file that I don't touch contains links to the updated worksheets and also charts based on these linked cells. When I save the template…
rf1234
  • 1,510
  • 12
  • 13
0
votes
1 answer

Getting OOM from large dataset

I'm trying to create a spreadsheet (XLSX) from a array containing 60k entries. When it exports, it gives me a spreadsheet with a PHP OOM warning on it nothing else. $spreadsheet = new Spreadsheet(); $spreadsheet->setActiveSheetIndex(0); …
Tanaka
  • 23
  • 1
  • 6
0
votes
0 answers

Issue with PHPSpreadsheet

I'm trying to build a script that will write data to an excel file before sending an email. I'm using PHPSpreadsheet for this, but the initial example is throwing an error. Can someone please let me know where I'm going wrong and how I can fix it.…
Krish
  • 401
  • 6
  • 18
0
votes
1 answer

Run PHP code after file is uploaded

I'm using JQuery File Upload to upload an excel file to my server. I need to be able to use the PHPSpreadsheet to then read the values from the excel file so that I can import them to the database. Both should happen in the same page. How can I use…
Inception
  • 455
  • 1
  • 9
  • 32