Trouble with masks while exporting XlXS to HTML

Topics: Developer Forum, Project Management Forum, User Forum
Jul 19, 2016 at 3:17 PM

I´m trying to use the PHPExcel to convert Excel Files to HTML, the Excel file have some masks (like number format, currency, dates, etc.) but when i try to export it to HTML, it show the field without his mask.

  in MS Excel the column show the date in Brazil format: "21/02/2016"
  in HTML the column show the date without mask:  "2016-02-12"
There's any way to convert to HTML with the masks?

Here is my Code:
$excelReader = new PHPExcel_Reader_Excel2007();
//Lê o arquivo excel
$excelFile   = $excelReader->load($file_location);
//Converte o arquivo para HTML
$excelWriterHtml = new PHPExcel_Writer_HTML($excelFile);
//Pega os dados HTML
$excelHtml   = $excelWriterHtml->generateHTMLHeader();
$excelHtml  .= '<style>' . utf8_decode($excelWriterHtml->generateStyles()) . '</style>';
$excelHtml  .= $excelWriterHtml->generateSheetData();
$excelHtml  .= $excelWriterHtml->generateHTMLFooter();
//echo or download the file after this code