代碼: 選擇全部
[2]=> object(PHPExcel_RichText_Run)#182 (2)
{
["_font":"PHPExcel_RichText_Run":private]=> object(PHPExcel_Style_Font)#189 (12)
{
["_name":"PHPExcel_Style_Font":private]=> string(14) "Century Gothic"
["_size":"PHPExcel_Style_Font":private]=> string(2) "10"
["_bold":"PHPExcel_Style_Font":private]=> bool(false)
["_italic":"PHPExcel_Style_Font":private]=> bool(false)
["_superScript":"PHPExcel_Style_Font":private]=> bool(false)
["_subScript":"PHPExcel_Style_Font":private]=> bool(false)
["_underline":"PHPExcel_Style_Font":private]=> string(4) "none"
["_strikethrough":"PHPExcel_Style_Font":private]=> bool(false)
["_color":"PHPExcel_Style_Font":private]=> object(PHPExcel_Style_Color)#188 (4)
{
["_argb":"PHPExcel_Style_Color":private]=> string(8) "FF000000"
["_isSupervisor":"PHPExcel_Style_Color":private]=> bool(false)
["_parent":"PHPExcel_Style_Color":private]=> NULL
["_parentPropertyName":"PHPExcel_Style_Color":private]=> NULL
}
["_parentPropertyName":"PHPExcel_Style_Font":private]=> NULL
["_isSupervisor":"PHPExcel_Style_Font":private]=> bool(false)
["_parent":"PHPExcel_Style_Font":private]=> NULL
}
["_text":"PHPExcel_RichText_TextElement":private]=> string(14) "& TECHNOLOGIES"
}
You can test if a cell contains a Rich Text object using:
代碼: 選擇全部
if ($objPHPExcel->getActiveSheet->getCell('A1')->getValue() instanceof PHPExcel_RichText)
代碼: 選擇全部
$plaintext = $objPHPExcel->getActiveSheet->getCell('A1')->getValue()->getPlainText();