php - phpexcel not converting my html table tag -


this code using phpexcel

$objphpexcel = new phpexcel();  $objphpexcel->setactivesheetindex(0); $objphpexcel->getactivesheet()->setcellvalue('a1', $message); $objphpexcel->getactivesheet()->settitle('sheet 1');  /*header('content-type: application/vnd.ms-excel'); header('content-disposition: attachment;filename="name_of_file.xls"'); header('cache-control: max-age=0');*/  $objwriter = phpexcel_iofactory::createwriter($objphpexcel, 'excel5'); $objwriter->save('test.xls'); 

i commented header because downloads using browser.

$message contains

 <style>                     .td_font{                          display: block;                         line-height:1px;                     }                     .header{                         font-size:0.8em;                         display: block;                         text-align:center;                         font-weight:bolder;                     }      </style>                     <table rules='all' border='1' cellspacing='0' cellpadding='0' width='100%' style='border-collapse: collapse; display:block;' >                          <tr>                               <td width='5%' class='header'>no.</td>                               <td width='35%' class='header'>hardware type</td>                               <td width='35%' class='header'>hw name</td>                               <td width='25%' class='header'>barcode</td>                          </tr></table>` 

when outputs. print html tags literally. possible in phpexcel interpret html tags of table table , save in excel?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -