Php export to not show meshes

I have this code

<?php
header("Content-type: application/vnd.ms-excel; name='excel'");

header("Content-Disposition: filename=export.xls");
// Fix for crappy IE bug in download.
header("Pragma: ");
header("Cache-Control: ");
echo $_REQUEST['datatodisplay'];
?>

It puts the data from the html table into excel, but the only problem is that I do not see the grid in the sheet. Am I missing something? Thanks

+5
source share
2 answers

Make sure you don’t have the <attribute background-colordefined for your HTML tag <BODY>. That was my problem. Delete it and all grid lines will magically reappear in Excel.

+1
source

Just install

 <body style="border: 1px solid #ccc"> 

on the HTML page that will be displayed in the excel file.

0
source

All Articles