Glam Prestige Journal

Bright entertainment trends with youth appeal.

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.

8 Answers

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.

2

Excel supports line returns within a cell. Line returns are sometimes created from copied text.

One way to check for this is expand the height of the formula bar or the width of the column. Look if text is forced to a new line.

To add a manual line return click in the formula bar then Alt+return. To find the line return chr search for CHAR(10)

Another option is check for space characters. Sometimes externally generated content add spaces. If this is your situation a clear pattern will likely emerge when this occurs.

5

I went to Alignment and changed the text alignment from Justify to General and it works after that. For some reason it does not work in Justify mode.

We just upgraded to NPOI 2.1 and the problem went away. So, now this is downgraded to a curiosity for me on what could cause it.

I'll mark this as answer at some point, but if someone has a better one feel free to post it, I will switch the check to the best answer I see.

In my case the problem was the affected cells had no vertical alignment set. When I selected them and chose a vertical alignment setting the Wrap Text selection disappeared and they now seem to be behaving normally.

All attempts at changing vertical alignment (Wrap Text included) were not working via ribbons or "Format Cells" dialog box / Alignment tab. I was able to get it working again by closing all open Excel documents and reopening.

I had copied information from one spreadsheet to another & forgot that some of my cells had the text running vertically. The numbers I was typing in the new spreadsheet were running vertically, and I thought it was a wrapping issue. You might check that.

you can try my tips as follows: choose a number of cells including the "wrap text" cells, click "merge & center" button twice to merge and split those cells. Now the trouble cells are no longer "wrap text". Hope this helpful :)

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy