Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPExcel Comment

Tags:

php

phpexcel

I am trying to insert a comment with in a cell. I am trying following code to comment but it is not showing comment within created excel. I am creating .xls extension.

$objPHPExcel->getActiveSheet()->getComment('E11')->setAuthor('Efusionsoft');
$objCommentRichText = $objPHPExcel->getActiveSheet()->getComment('E11')->getText()->createTextRun('PHPExcel:');
$objCommentRichText->getFont()->setBold(true);
$objPHPExcel->getActiveSheet()->getComment('E11')->getText()->createTextRun("\r\n");
$objPHPExcel->getActiveSheet()->getComment('E11')->getText()->createTextRun('Total amount on the current invoice, excluding VAT.');
like image 749
Amit Garg Avatar asked Jan 04 '13 06:01

Amit Garg


1 Answers

There is no support for comments in the Excel5 writer. Use the Excel2007 writer to create an .xlsx file.

like image 131
AndreKR Avatar answered Oct 16 '22 06:10

AndreKR