With phpspreadsheet, i can’t put a formula in a cell. I get an error : L43 -> Formula Error: An unexpected error occurred While when i put this formula in an excel file directly it’s working nice. My formula is : “=IF(SUM(J2:J41)<>SUM(L2:L41);”1″;”2″)”. There is my code : $sheet->setCellValue($cell, $formula); I also test with $sheet->setCellValueExplicit($cell, $formula, DataType::TYPE_FORMULA); But i doesn’t work
Tag: phpspreadsheet
How to display the original data in excel whichever returns from the database in php?
I am using matwebsite for exporting excel files ,i am getting the data from the database it’s stored in the exported excel file upto this part it’s working fine .some of the values are more than 15 digits at that time it’s displaying as scientifc format for that i made some changes using columnFormats() function now it supports upto 16
Convert Excel file to array while preseerving formatting when using PHPSpreadsheet
Whatever I do, my array does not keep cell value formatting when I convert data to array. How to convert formatting to HTML preferably? Answer Looks like converting spreadsheet to HTML file, and reading that through DOMDocument parser work for me for now.
After reading and writing an excel file using phpSpreadSheet, the graph disappears
I’m trying to fill an excel file with data coming from a mysql server and using phpSpreadSheet. Then, I need to create a graph so users can see the graph already made. I can fill the excel file no problem, but the graph doesn’t show up. So I decided to simplify the problem by adding the headers and the graph
PHP SpreadSheet can’t find the function to auto size column width
I simply want the columns to autosized. I am using php spreadsheet and I can’t find how to do it. I have searched other questions but they are using functions that i can’t event find in my lib worksheet.php like getActiveSheet() Any advise ? This is my code Answer For spreadsheet the answer is:
PHPSpreadsheet: Formatting a cell for time also includes the date
I am trying to format a time cell using PHPSpreadsheet but it seems to be including the date as well when looking at the formula bar. There also seems to be some inconsistency when converting from a …
Read XLS in PHP using PhpSpreadsheet
I have a requirements to read XLS files (not xlsx) using PhpSpreadsheet and I having trouble. I tried this (as the documentation say but…) but didn’t work (it worked with a xlsx file, but no with a xls file!) Then I tried to open file differently: but also doesn’t work… I really need to solve this… please help! PS: I’ve
ReturnDatesAsStrings=>true returns timestamp with decimal & zeros
I’m using PHP 7.2, MS SQL Server, fpdf, and phpSpreadsheet to create PDF and Excel reports of my data. Initially I had trouble returning the timestamp (date) fields in the reports, but adding “ReturnDatesAsStrings”=>true in my connection.php solved that problem. The issue now is that the date fields on the reports have a decimal and zeros added and show up
Center all text in PHPSpreadsheet and make the cells expand to fill up with context
I struggle a bit to make all the cells set the context to center and to autoexpand so it doesnt overlap each other. So what I try to do is: Set the info in every cell to be centered since it makes …
How to use PhpSpreadsheet without installation (like PHPExcel)
According to the PhpSpreadsheet Doc it’s neccessary to install it with composer. In my case I just have a webspace without Terminal but Plesk. Is it anyway possible to use PhpSpreadsheet, like it is with PHPExcel where you just have to place the files in any location? What do I have to do to get it run? I found no