Skip to content

Instantly share code, notes, and snippets.

@natergj
Created May 22, 2019 21:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natergj/21266b7f9f7653006d20d15eb45d18b1 to your computer and use it in GitHub Desktop.
Save natergj/21266b7f9f7653006d20d15eb45d18b1 to your computer and use it in GitHub Desktop.
Text wrapping code snippet
const xl = require("excel4node");
const wb = new xl.Workbook();
const ws = wb.addWorksheet("Sheet1");
ws.cell(2, 5, 2, 11, true)
.string(
"There is a flower within my heart, Daisy, Daisy! Planted one day by a glancing dart, Planted by Daisy Bell! Whether she loves me or loves me not, Sometimes it's hard to tell; Yet I am longing to share the lot Of beautiful Daisy Bell!"
)
.style({
alignment: {
wrapText: true
}
});
ws.row(2).setHeight(80);
wb.write("MyWorkBook.xlsx");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment