$objWriteHTML = new \PHPExcel_Writer_HTML(\PHPExcel_IOFactory::load(\"大众C:/Users/jijia2/Desktop/aa.xlsx\"大众));

//获取样式

$css=$objWriteHTML->generateStyles();

phphtmltoexcelphpexcel将excel转为html直接展现在页面上 JavaScript

//获取excel数据

$data = $objWriteHTML->generateSheetData();

$html = $css.$data;

前端展示这个$html就可以了