title: How to format a cell header in xlsx angular
body: <p>How to format a cell in angular using xlsx or the cellStyles.</p>
  
  <p>here's the code.</p>
  
  <p><strong><em>list.component.ts</em></strong></p>
  
  <pre><code>const ws = XLSX.utils.json_to_sheet(reportData);
            ws['!cols'] = [];
            Object.keys(reportData[0]).forEach((cell: any) =&gt; {
              const colWidth =
                cell === 'Date'
                  ? 120
                  : cell === 'Time'
                    ? 100
                    : cell === 'Location'
                      ? 200
                      : cell === 'Temperature'
                        ? 80
                        : cell === 'Humidity'
                          ? 80
                          : 100;
              ws['!cols'].push({
                wpx: colWidth
              });
            });
  
            XLSX.utils.book_append_sheet(wb, ws, this.roomTitle);
            XLSX.writeFile(
              wb,
              `${fileName}.xlsx`,
              { cellStyles: true },
            );
  </code></pre>
  
  <p>what I'm trying to do here is to format it into <code>BOLD TEXT</code> the header which is the <code>Date, Time, Location, Temperature and Humidity</code></p>