sseeley Posted August 8, 2009 Share Posted August 8, 2009 I am trying to replace the value of the cell based upon a database query. This works fine for a value, however if I change to text it does not replace the value in the new spreadsheet. This is the code for a value which works fine... $row3 = 3; $iv = 0; while ($iv < $num_results) { $lastName = mysql_result($getCadets,$iv,"tbluser.lastName"); $lastName = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256,$key,$lastName,MCRYPT_MODE_ECB,$x)); $objPHPExcel->getActiveSheet()->setCellValue('D' . $row3, $lastName); $iv++; $row3++; } This code for text does not replace the text when the spreasheet is recreated. $row3 = 3; $vi = 0; while ($vi < $num_results) { $telephone = mysql_result($getCadets,$vi,"tbluser.telephone"); $telephone = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256,$key,$telephone,MCRYPT_MODE_ECB,$x)); $objRichText = new PHPExcel_RichText( $objPHPExcel->getActiveSheet()->getCell('F' . $row3) ); $objRichText->createText($telephone); $vi++; $row3++; } Can anyone help me please. Many thanks Stuart Link to comment https://forums.phpfreaks.com/topic/169337-phpexcel/ Share on other sites More sharing options...
TeNDoLLA Posted August 8, 2009 Share Posted August 8, 2009 You could ask about this in here: http://www.sitepoint.com/forums/forumdisplay.php?f=34 . There is atleast one quite active user called Mark Baker who is developing PHPExcel and he has answered my questions pretty fast usually. Link to comment https://forums.phpfreaks.com/topic/169337-phpexcel/#findComment-893656 Share on other sites More sharing options...
Mark Baker Posted August 8, 2009 Share Posted August 8, 2009 Personally I'd recommend asking this question on the PHPEXcel forums, where Erik or Maarten would be better able to help than myself. I'm active on a number of forums including Devshed and php developers network as well as sitepoint and here on phpfreaks, and can answer general questions on Excel in general or on PHPExcel, or specifics about the calculation engine; but I know very little about the Rich Text feature. Link to comment https://forums.phpfreaks.com/topic/169337-phpexcel/#findComment-893748 Share on other sites More sharing options...
Mark Baker Posted August 8, 2009 Share Posted August 8, 2009 My only suggestion might be that you're not actually setting any rich text features in the cell that you're writing, simply specifying a plain text value, no different to simply using setCellValue. Link to comment https://forums.phpfreaks.com/topic/169337-phpexcel/#findComment-893756 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.