Line of grid in created pdf

Topics: Developer Forum, User Forum
Dec 15, 2009 at 3:44 PM

I need create pdf as excel with Grid lines when I can see it in excel.

I use PHPExcel 1.7.1.
In forder  I take file 21pdf.php, in this file I commented 33 and 34 lines
and added two lines 36, 37

36 $objPHPExcel->getActiveSheet()->setShowGridLines(true);
37 $objPHPExcel->getActiveSheet()->setPrintGridLines(true);
After run the script I get 21pdf.pdf without grid lines.
Tell me what is wrong ?
Developer
Jan 20, 2010 at 11:54 AM

The problem is that TCPDF (which PHPExcel uses) has incomplete support for borders in HTML mode. We are still waiting for the situation to change.

Meanwhile, you can try to play with mPDF which has better support for borders. If you first export to HTML with inline CSS using PHPExcel, you can afterwards send the generated HTML to mPDF that can generate the final PDF. It may require some experiments.