Sheetjs: Wrap text by column

Created on 21 Mar 2018  Â·  5Comments  Â·  Source: SheetJS/sheetjs

Is there anyway to wrap text per column similar to excel?

image

Most helpful comment

cell.s = {
  alignment: {
    wrapText: '1', // any truthy value here
  },
};

Plain does not work.

Please provide a complete example, or documentation ...

Documentation on how to use your product EFFECTIVELY would be welcomed :)

All 5 comments

Yes, specify cell style like that

cell.s = {
  alignment: {
    wrapText: '1', // any truthy value here
  },
};

Hey @sgrogov , could you kindly tell me how to add the style to merged cells or add the style to a range cells. thank you very much

Hi @lujuliang.

As far as I remember for merged cells you have to set your styles to the top left cell. But for borders styling you have to set styles to each cell just as if they were not merged.
And about range of cells just set styles to each cell.

Hope it's clear :)

cell.s = {
  alignment: {
    wrapText: '1', // any truthy value here
  },
};

Plain does not work.

Please provide a complete example, or documentation ...

Documentation on how to use your product EFFECTIVELY would be welcomed :)

@lujuliang cell styling isn't supported in the core library. A fork exists with documentation for cell styles here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alex0007 picture Alex0007  Â·  3Comments

Sankrish picture Sankrish  Â·  4Comments

DannyRyman picture DannyRyman  Â·  3Comments

thomasledoux1 picture thomasledoux1  Â·  3Comments

sangpuion picture sangpuion  Â·  3Comments