Questions tagged [phpoffice-phpspreadsheet]

70 questions
0
votes
1 answer

Installation error on PHPOffice PHPSpreadSheet with Composer

I am using Windows 10 with Laragon 5.0 WAMP (PHP 7.4.19 & Apache 2.4.47). Trying install PHPOffice/PHPSpreadSheet with Composer using this command: composer require phpoffice/phpspreadsheet Nothing wrong with Composer installation, but when trying…
wieb
  • 113
  • 1
  • 2
  • 11
0
votes
1 answer

is there a way to put placeholders in excel files using phpspreadsheet?

is there any way to get placeholders in my excel file using phpspreadsheet? all I see I can do is using a specific cell to put my data into it eg. setCellValue('A1','John') I want to insert data into my excel where I have a placeholder not into a…
0
votes
1 answer

Display time range formatted with PhpSpreadsheet

I'm using PHPSpreadsheet to generate an XLS file with report data, and in some situations, display an XLS formatted as HTML on screen. How can I display a formatted time range in an Excel worksheet? I have a range of 25:30 hours that I would like to…
Tom
  • 641
  • 2
  • 8
  • 21
0
votes
1 answer

PhpSpreadsheet Date::PHPToExcel() adding time

I am trying to add a date field into an Excel file without the time portion. This is my current code: $dt = !empty($date) ? Date::PHPToExcel(DateTime::createFromFormat('Y-m-d', $date)) : null; $spreadsheet->getActiveSheet()->setCellValue("A1",…
dokgu
  • 4,957
  • 3
  • 39
  • 77
0
votes
1 answer

phpspreadsheet: function 'sum' problem output with '@'

when I try to use the 'sum' function with phpspreadsheet, the output returns with '@'. The logical sequence works correctly (therefore the cells with which to add the sum are correct). SEE IMAGEcorrect). SEE IMAGEVEDERE…
0
votes
1 answer

PHPSpreadsheet writer - How to fit content

I've successfully convert Excel to PDF using this code: $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet,…
Coisox
  • 1,002
  • 1
  • 10
  • 22
0
votes
2 answers

How to write only active sheet of xlsx file PHPSpreadsheet

i want to show the xlsx file as html, but it always return the first sheet of the file. What i want is to get the writer to show the one active sheet only if there are multiple sheets (name and order of sheet are random). here is my code : public…
0
votes
1 answer

How to export two tables on a single sheet with different headers using Php?

I have two database tables on a web page which I want to export on a click of a button to a single excel sheet. I have installed PHPOffice/PhpSpreadsheet as a commentator suggested. I was able to export data using foreach loop like this: $query…
user17131817
0
votes
0 answers

How Can Display a microsoft word document, spreedsheet document using php

am working on an inhouse document management system with Core PHP and postresql but i am trying to display an MS word Document and spreedsheet document using Core PHP but seem to fail, i have seen google docs viewer but it works online we dont…
0
votes
1 answer

how to save PHPspreadsheet xlsx file on xampp server?

I am using PHPspreadsheet to create xlsx file on xampp. I want to run cron jobs in wordpress that will auto export some orders and save xlsx file on xampp server. I've successfully exported a file using $writer->save('php:\\output'); but this just…
0
votes
0 answers

PhpSpreadsheet string with double quote

I am trying to write a string that contains double quotes in a cell, write it to disk and read it again from an xls file. Example strings are: single quote " double quotes "" I set the cell values via // $page is of type…
0
votes
0 answers

Is it possible to use php spreadsheet without composer?

Is it possible to run php spreadsheet without composer? If there is, how to do it?
0
votes
0 answers

PHP foreach value not inserting for csv cell value

I tried to assigned the php string into my csv cell value, but cell always return blank value. The value it self came from 2 requests, one from mysql and another from curl. from mysql request it's working fine but when I assigned the value from curl…
Bekka
  • 39
  • 6
0
votes
1 answer

Downloading generated excel only works locally | WordPress

I have a word press page that shows a report as an html table, on button click, that report should be downloaded as xlsx file. The problem is that while download feature works perfectly on my local machine, on the server I get gibberish like this…