I save the table in xlsx format
$html = $_POST['html']; file_put_contents($path."/table.html", $html); $objReader = new PHPExcel_Reader_HTML; $objPHPExcel = $objReader->load($path."/table.html"); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter->save($path."/table.xlsx"); The file is created, but instead of the Russian letters kryakozyabry. The html code from the browser page (utf-8) is transferred to $ html. Help defeat the encoding.
With the encoding issue was resolved.
The solution was as always simple. I tried to convert html to Excel. But this html was only the code table
<table><tr><td></td></tr></table> but you must
<html><head><meta charset="UTF-8"></head><body><table> ..................... How to save table styles now?
<td style='background-color:#F8F8F8; border:1px solid #000; width: 250px'> Does not help