A
A
Artur2020-10-29 22:52:06
JavaScript
Artur, 2020-10-29 22:52:06

How to set column width in google sheets using google-spreadsheet (nodejs)?

How to set column width and style cells (font size, color, background)?
5f9b1d16e70ec235782099.png

const sheet = await doc.addSheet({sheetId: 123123354, title: `Tracking - ${new Date().toLocaleDateString()}`, headerValues: rowHeaders});

  const users = await userRating.find({level: {$in: trackingLevels}}, {"sort":{"progress": -1}});

  for (let user of users) {

      await sheet.addRows([
        {
          'id': user.userId,
          'Уровень': user.level,
          'Прогресс': user.progress,
        }
      ]);
  }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question