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

How to apply footer on last page only using phpspreadsheet

Is spreadsheet has function to set footer on last page only? If could not, how to create report footer in phpspreadsheet? Is this possible? $spreadsheet->getActiveSheet()->getHeaderFooter()->setOddFooter('footer caption'); Thanks in advance.
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
2 answers

How to lock particular cell using phpspreadsheet

Initially all cells in worksheet are locked. Then, I unlock all the cells and try to lock only some of the cells. $spreadsheet->getActiveSheet()->getStyle('A1')->getLocked()->applyFromArray( [ 'locked' => TRUE, 'hidden' =>…
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
0 answers

Does PhpSpreadSheet have a function to generate an .xlsx file from a PHP array automatically?

Newbie here, here's the question : Does PhpSpreadSheet have a function to generate an .xlsx file from a PHP array automatically? I searched but could not find. So far, I only found the setCellValue() function which (obviously) allows me to set the…
AniMir
  • 150
  • 12
0
votes
1 answer

How to get expandable rows from xlsx-file with group/level filter by PhpOffice/PhpSpreadSheet?

The xlsx-file contains rows on three levels. Records from level one: click on plus expands rows from level two. Records from level two: click on plus expands rows from level three. I'm using PhpOffice\PhpSpreadSheet. How to get rows only from level…
Vladimir
  • 1
  • 2
0
votes
1 answer

Multi line header using phpspreadsheet

I insert multi line header using phpspreadsheet. Then, I save as xlsx file. I use convertapi to convert the xlsx file to pdf. In pdf, only header line one only aligned to…
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
1 answer

PhpSpreadsheet : SUMIF formula is not working

What is the expected behavior? I tried to add the formula =SUMIF, but this is not working. An error occure and the formula is deleted when I open the excel file What is the current behavior? When the code try to calculate the formula, this is…
Chatis
  • 47
  • 2
  • 11
0
votes
0 answers

PhpSpreadSheet to .txt

I'm working in a web project to let people convert SpreaSheet file to formated text. I was looking everywhere in PHPSpreadSheet doc to find how to export a spreadsheet to a formated text file. Do someone know how proceeding ? Best regard
0
votes
1 answer

getUnderline of excel cellcontent using phpspreadsheet

I have use the code below to find if cell content has been underlined or not using phpexcel $inputFileType =PHPExcel_IOFactory::identify($file); $objReader =PHPExcel_IOFactory::createReader($inputFileType); $objPHPExcel …
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
2 answers

Write to multisheet excel using phpspreadsheet in php

I manage to write into excel file using phpspreadsheet... but for single sheet only. I try to create multisheet but failed.. appreciate your help to assist. Below are my codes..Thanks in advance. public function exportAll()( { $e = 2; // Row…
Julie
  • 313
  • 6
  • 18
0
votes
0 answers

PHPSpreadsheet - How do create text that is red colored?

I use the next line to color a cell…
Pascal
  • 427
  • 2
  • 6
  • 13
0
votes
2 answers

PHP check if value present in while loop and enter value then break

I am using PHPspreadsheet and all works well. However I have an issue when generating a sign-in sheet when no one is working on a particular day THis then puts all entries on my excel template out of sync. Question: How do i check the first…
waxies
  • 11
  • 3
0
votes
1 answer

How can i store a BLOB image into a temporary file?

I am currently storing images into a database, i can display them on a webpage just fine using the following code:
0
votes
2 answers

PHPSpreadsheet: Scale must be greater than or equal to 1

When I try to open/read the spreadsheet (xls), I get the following error: Scale must be greater than or equal to 1 I am using the following code to open and read the file: $filename = 'test.xls'; $spreadsheet = IOFactory::load($filename); //<--…
ed13
  • 349
  • 5
  • 19
0
votes
1 answer

how to customize date format in phpspreadsheet?

I wanted to customize date in phpspreadsheet. Feb 10, 2019 11:34:04 That's the default format but I wanted to add PM or AM at the end. Is there any way to customize date format in phpspreadsheet? These two aren't…
silent_coder14
  • 583
  • 2
  • 10
  • 38
0
votes
0 answers

PHPspreadsheet only saves "Sheet1" when xlsx but is ok when xls

I'm using PHPSpreadsheet to generate an XLSX file. the code $spreadsheet->setActiveSheetIndex(0); $writer = new Xlsx($spreadsheet); $full_filename = $path . $filename . '.xlsx'; $writer->save($full_filename); When using the above code file only…
milwell
  • 1
  • 3