Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to style first row? #164

Open
matze1708 opened this issue Jan 21, 2022 · 1 comment
Open

How to style first row? #164

matze1708 opened this issue Jan 21, 2022 · 1 comment

Comments

@matze1708
Copy link

Hi guys,

how it is possible to style the first row?

i´d try this

          const CellOptions = {
            font: {
              name: 'Arial',
              sz: 10,
              bold: true,
              color: { rgb: "FFFFFFFF" }
            },
            fill: {
              bgColor: { rgb: "FF59AB44" },
              fgColor: { rgb: "FF59AB44" },
            },
            alignment: {
              wrapText: true
            },
          };


      WS['A1'].s = CellOptions;

but what i do for A1 i need A1 to K1

Thanks you

@pietersv
Copy link
Collaborator

pietersv commented Jan 21, 2022

If you know the extent, you can iterate over each cell, e.g.
"ABCDEFGHIJK".split('').forEach(c=>WS[c+'1'].s = CellOptions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants