Answers for "data to excel php"

PHP
0

excel date format in php

Please use this formula to change from Excel date to Unix date, then you can 
use "gmdate" to get the real date in PHP:

UNIX_DATE = (EXCEL_DATE - 25569) * 86400
  
and to convert from Unix date to Excel date, use this formula:

EXCEL_DATE = 25569 + (UNIX_DATE / 86400)

After putting this formula into a variable, you can get the real date in PHP 
using this example:

$UNIX_DATE = ($EXCEL_DATE - 25569) * 86400;
echo gmdate("d-m-Y H:i:s", $UNIX_DATE);
Posted by: Guest on January-07-2022
-2

export html table data to excel in php

Use a PHP Excel for generatingExcel file. You can find a good one called PHPExcel here: https://github.com/PHPOffice/PHPExcel

And for PDF generation use http://princexml.com/
Posted by: Guest on March-05-2021

Browse Popular Code Answers by Language