Excel 2007 “Wrap Text” button won’t “de-wrap” certain cells

microsoft excel

I have an excel document where after clicking on a cell that is apparently wrapping text, I can't simply click the Home Ribbon's "Wrap Text" button to stop wrapping. Repeatedly clicking the "Wrap Text" button (or going to cell formatting checkbox) doesn't stop the cell from wrapping. (I can clear the "wrap text" checkbox in formatting, but the ribbon button remains selected and the text remains wrapped)

I can type data into the cell so it doesn't appear to be protected, but this is a document that was generated with Apache NPOI, so some strange settings may be in effect.

Other "fresh/unused" cells in the document work just fine with the same text as the problem cells copied into them.

Best Answer

FYI, I've had this same problem recently, when manipulating cells that had previously been merged. It seems the wrap text button doesn't work (won't toggle off) if the horizontal or vertical alignment of the text inside is set to justify (no idea why it became justified in the first place though).

Re-setting the alignment to left/centre allowed me to un-wrap the text again.