{"id":8020,"date":"2015-11-21T13:40:40","date_gmt":"2015-11-21T13:40:40","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/21\/phpexcel-how-to-make-part-of-the-text-bold-open-source-projects-phpoffice-phpexcel\/"},"modified":"2022-08-30T15:03:03","modified_gmt":"2022-08-30T15:03:03","slug":"phpexcel-how-to-make-part-of-the-text-bold-open-source-projects-phpoffice-phpexcel","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/21\/phpexcel-how-to-make-part-of-the-text-bold-open-source-projects-phpoffice-phpexcel\/","title":{"rendered":"PHPExcel &#8211; How to make part of the text bold-open source projects PHPOffice\/PHPExcel"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/wFBVg.png?s=128&amp;g=1\" \/> <strong>pacific<\/strong><\/p>\n<pre><code>$objPHPExcel-&gt;setActiveSheetIndex(0)\n            -&gt;setCellValue('A1', 'Hello')\n            -&gt;setCellValue('B1', 'world!')\n            -&gt;setCellValue('C1', 'Hello')\n            -&gt;setCellValue('D1', 'world!');\n<\/code><\/pre>\n<p>for single cell use:<\/p>\n<pre><code>$objPHPExcel-&gt;getActiveSheet()-&gt;getStyle(\"A1\")-&gt;getFont()-&gt;setBold(true);\n<\/code><\/pre>\n<p>for multiple cells use:<\/p>\n<pre><code>$objPHPExcel-&gt;getActiveSheet()-&gt;getStyle(\"A1:D1\")-&gt;getFont()-&gt;setBold(true);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>pacific $objPHPExcel-&gt;setActiveSheetIndex(0) -&gt;setCellValue(&#8216;A1&#8217;, &#8216;Hello&#8217;) -&gt;setCellValue(&#8216;B1&#8217;, &#8216;world!&#8217;) -&gt;setCellValue(&#8216;C1&#8217;, &#8216;Hello&#8217;) -&gt;setCellValue(&#8216;D1&#8217;, &#8216;world!&#8217;); for single cell use: $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle(&#8220;A1&#8221;)-&gt;getFont()-&gt;setBold(true); for multiple cells use: $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle(&#8220;A1:D1&#8221;)-&gt;getFont()-&gt;setBold(true);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8020","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8020"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8020\/revisions"}],"predecessor-version":[{"id":8690,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8020\/revisions\/8690"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}