If you notice in above screenshot, in actions column the word "Flight" breaks into two parts and same in Expected Result the word "displayed" breaks into two parts. In this case long words are breaking, but small words also gets breaking. If i use word-break: break-all, when i export the final output is
If i use overflow-wrap or word-wrap or both, when i export the final output isīut in this case small words are not breaking. Please see the reference screenshots below: I tried to use both " overflow-wrap: break-word " and "word-wrap: break-word ". Is there any fix for this? I am using velocity template to generate the report, it works in browser but it doesn't works in word document. I am trying to wrap the long size word in exported document using word-break: break-all element. Intersting! You may want to try an alternate way of getting that done, perhaps try:Ĭan you say if the report you are developing worked for Word exports in the past, or if this is a new report you are creating that won't wrap long text in Word? Because of this my table is expanded, when i export table goes out of margin But still long words like URL's and file path specifications are not breaking. Subject: Wrapping text in exported word document If there is an "acceptable break" character (like a literal dash, for instance), it will break there, otherwise it just does what it needs to do." With overflow-wrap in use all by itself, words will break kinda anywhere they need to. Blink (tested Chrome v45) will take either one. Firefox (tested v43) only supports word-wrap. Some browsers support one and not the other. You might as well use word-wrap as well because as the spec says, they are literally just alternate names for each other. " overflow-wrap: break-word makes sure the long string will wrap and not bust out of the container. In this article, Handling Long Words and URLs (Forcing Breaks, Hyphenation, Ellipsis, etc), you can see a few other alternate ways to make sure that URLs are breaking up too. I'm glad that at least the words are breaking up.