Created
May 22, 2019 21:27
-
-
Save natergj/21266b7f9f7653006d20d15eb45d18b1 to your computer and use it in GitHub Desktop.
Text wrapping code snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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