1

How to set bold font to only one word from a cell? The documentation shows how to set all cells to a font type. As an example, I'll add a <b> tag to show which word will be in bold.

ws.cell(index + 4, 2).string(p[i].dataValues.diameter + '\n' + '<b>' + psw[i].dataValues.well + '</b>').style(styleText);
user12916796
  • 191
  • 9

1 Answers1

0
const answer = [
  'you do it like',
  { bold: true, color: '00ff00' },
  'this',
  { bold: false, color: '000000' },
  '.'
];

worksheet.cell(1, 1).string(answer);
John Haugeland
  • 9,230
  • 3
  • 37
  • 40