Tag: 大胆

getBold与PHPExcel单元格

我想通过PHPExcel将单元格值和其他属性导入数据库时​​,如果单元格是粗体的 var_dump($worksheet->getCellByColumnAndRow($column, $row)->getStyle()->getFont()->getBold()); 我很容易得到的价值,但是每当单元格大胆或不是那个事情总是返回false while($worksheet->getCellByColumnAndRow($column, $row)->getValue() != NULL) { $tableCell = $worksheet->getCellByColumnAndRow($column, $row)->getValue(); //Test if the field is in bold if ($worksheet->getCellByColumnAndRow($column, $row)->getStyle()->getFont()->getBold()) { $header = true; }else { $header = false; } //Test if the field need to be displayed if (preg_match($regPattern, $tableCell)) $displayOnQuestion = true; else $displayOnQuestion = false; $inputTableCell = array( "FK_Question" […]

excel vba:使string粗体的一部分

我有excel包含这样的条目的单元格: name/A/date name/B/date name/C/date 单元格内容显示在同一单元格的多行上。 我想只为所有参赛作品“大胆”。 我logging了一个macros,我认为解决scheme必须是这样的: ActiveCell.FormulaR1C1 = "name/A/date" & Chr(10) & "name/B/date" & Chr(10) & "name/C/date" With ActiveCell.Characters(Start:=25, Length:=4).Font .FontStyle = "Bold" End With 我不知道如何获得每个条目的起始值和长度。 任何人有一个想法?