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
1 answer

How to get first column index in PhpSpreadsheet

I have to iterate through all rows of first two columns of a xls document. The problem is that first column of this specific document is "G" with and index of 7. Is there any way of getting the first column index because I don't want to hard-code…
failedCoder
  • 1,346
  • 1
  • 14
  • 38
0
votes
0 answers

Progress Bar phpSpreadSheet

I am creating an Excel with PhpSpreadsheet (no prob with that). I am working with MVC pattern so the flow is : User press download button and call function in controller function in controller call a function in an helpers to create the excel Now…
dack funk
  • 43
  • 6
0
votes
1 answer

phpspreadsheet with redis increases run time

when setting the cache method to redis it seems to increase runtime for loading a spreadsheet and reading etc. before i use any part of PHPSpreadsheet classes i run the following if(CACHE_ON){ $client = new \Redis(); …
shorif2000
  • 2,582
  • 12
  • 65
  • 137
0
votes
1 answer

Excel - Getting the Top 5 data of a column and their matching title but produces duplicates

I am developing a web application made using PHP (withh CodeIgniter as the framework) that should produce an excel file report as as summary of data. I am using PHPSpreadsheet as a library to generate the .xlsx file and everything is successful. I…
Suomynona
  • 639
  • 1
  • 5
  • 20
0
votes
0 answers

Generating dynamic excel from phpspreadsheet which is basically analysis data

I have 3 tables data named survey, survey_questions and survey_answers. where questions and answers are in the form of json data type where each question and answer have unique option ids. Now, I have to write this data into excel in the following…
nikhil
  • 1
  • 1
0
votes
1 answer

DataSeriesValues for Time Values in Chars

I am create a report using PHPSpreadSheet, the data are time values base, and there is one chart to represent the monthly report, but the Chart Keep read my data as string , and the dataseriesvalues from PHPSpreadsheet only support…
Thomas Jeriko
  • 213
  • 3
  • 13
0
votes
0 answers

PhpSpreadsheet: "Undefined offset" and "trim() expects parameter 1 to be string"

I get the following error and I'm trying to figure out if it's something in my code or if my template is causing the error. I can upload the template if needed, but thought I'd check if I've missed something obvious or if this is a known problem…
SeaBass
  • 1,584
  • 4
  • 20
  • 46
0
votes
2 answers

How to export data from MySQL to Excel(.xlsx) but handling the data before exporting

I am trying to export data from MySQL to xlsx but in my database may have some 0 and 1 instead of real data. Let me explain better: There's a column used to set if it's day or night but using 0 to day and 1 to night. When i export using the code…
0
votes
0 answers

PHPSpreadsheet generates empty file if it containts more than 16 rows

I am generating a xlsx file with PHPspreadshet and it always gives me an empty file (0kb) when it has more than 16 rows. I already tried to search for erros etc. and found nothing. It just depends on the row. The Spreadsheet (Html for testing): And…
user3241778
  • 294
  • 2
  • 4
  • 20
0
votes
1 answer

Getting exception "PhpOffice \ PhpSpreadsheet \ Reader \ Exception" when parsing specific csv file

Something in a csv file I am trying to import using Maatwebsite's Laravel Excel package (which uses PhpOffice's PhpSpreadsheet package) is causing the import to blow up with the following exception: PhpOffice \ PhpSpreadsheet \ Reader \…
Jason Ayer
  • 621
  • 1
  • 10
  • 20
0
votes
1 answer

Access value from object(with private property) in array using php

I want to get value from object in array. Object property has been set to private. So, I could not access the value. I try to convert private to public using Php ReflectionClass. VarDump of Object In Array($obj_array) array(1) { [23]=> …
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
1 answer

How to call getDefaultRowHeightByFont() function correctly in phpspreadsheet

I am writing to excel row by row and try to get current row height after write to each row. I tried use getDefaultRowHeightByFont() to get default row height based on font type. $font_type='times new…
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
1 answer

How to get selected dropdown value?

I am trying to get value of cell which has dropdown selection. I tried this one: $spreadsheet->getActiveSheet()->getCell("D7")->getCalculatedValue() But I am getting only default one. Dataset for this dropdown select is in another page. How can I…
0
votes
1 answer

How to fix phpspreadsheet excel not downloading in php?

I'm making a Web portal my the company that i'm working. Now, i'm stuck in generating an excel report using PhpSpreadSheet. I cannot download the file instead just saving the excel file from where my phpfile is located. But if i call this file in my…
Khenjhie
  • 11
  • 2
0
votes
1 answer

PhpSpreadsheet import data from excel to database symfony 3.4

i would like to know how can i use PhpSpreadsheet symfony 3 , should i use this bundle : roromix/SpreadsheetBundle, can i have a little exemple how to use it to read rows from exemple_file.xlst thank you