# Excel Text Wrapping on Import



## pfreeman (Dec 12, 2010)

I want to import a text file into Excel 2007. One of the columns will have some cells with 400+ characters of text. I set the width of the column in question fairly wide, formatted it as "wrap text" and with vertical orientation as "top". When I do the import, I leave that column as "general" (I found that if it is formatted as "text", I get ##### if there are many characters in a cell). The import works just as desired with the row heights adjusted to the amount of text, but if there's more than about 350 characters, it quits wrapping and spills into the next columns. I tried making the column in question wider and it spilled over at the same place, so I don't believe it is a limit relating to line adjustment. I believe Excel 2007 allows several thousand characters per cell, so I am guessing it is a limitation on the wrapping. It is a bit strange that the spill-over doesn't seem to happen at exactly the same number of characters for each line where this occurs, but it is always close to 350. Are there ways of circumventing the limitation? Thanks.


----------



## RSpecianjr (Jan 20, 2010)

Hey pfreeman,

I haven't heard of this before, but I do know that if the cell isn't large enough, then the characters inside will read as #'s. Usually with dates anyway. 

I have seen a lot of problems with formatting cells as text. When I tried, it would no longer use the text wrap feature. Why do you want to format as text?

I would try importing your information and leaving it as general format. Then use word wrap, see if that works.

Note: I have seen problems with formatting cells as text and then going back to non-text based formats... it doesn't take unless you click in the cell then hit enter. I'd test on a fresh worksheet to avoid that hassle.

Regards,

Robert D. Specian Jr.


----------



## pfreeman (Dec 12, 2010)

Robert, 

Actually I have already done what you suggest - format the column as "general". I originally tried formatting as "text" but as you say, that did not work well at all. 

With it formatted as "general", it wraps but only handles about 350 characters. It is that apparent limitation on characters that I want to overcome. I tried making the column wider without any effect.

Thanks,

Phil Freeman


----------



## RSpecianjr (Jan 20, 2010)

Hey pfreeman,

I copied and pasted your original post (over 1000 characters) into a cell and just added the word wrap. It worked just fine for me. Try doing this in a brand new workbook and add just the word wrap. You may have to adjust the column width and the row heigth.Let me know if that works. 

If it does, try importing the data into a brand new workbook and then add just the word wrap. If this works, then it is probably the formatting cells as text issue I was talking about. 

If none of it works, let us know and we can look into something else...

Regards,

Robert D Specian Jr.


----------



## pfreeman (Dec 12, 2010)

Hi, Robert. So, how does Excel know the word "wrap" is not being used in a sentence? I didn't know you could format that way. I tried it on my laptop here at home and it didn't work, but I have an earlier version of Excel. I know there were some significant changes made in the 2007 version, so I will try that tomorrow. Again, let me emphasize that in my original attempt at this, I did not format the column as "text" - I formatted it as "general". Thanks.


----------



## RSpecianjr (Jan 20, 2010)

Hey pfreeman,

As far as I know, a sentence isn't formatted at all in Excel. The cell is formatted with word wrap. If the cell isn't formatted for it, it won't wrap... Importing it might change things a bit, but I am not aware of it.

Regards,

Robert D. Specian Jr.


----------



## pfreeman (Dec 12, 2010)

Robert, Attached you will find the text file that I am trying to import. I have to run to a meeting, but when I get back I will zip up the example I have of the outcome.


----------



## pfreeman (Dec 12, 2010)

The attached file shows what I get when I import into Excel the .txt file I uploaded earlier this morning.


----------



## pfreeman (Dec 12, 2010)

Robert, I just wanted to let you know that I found a work-around. The text file I was trying to import is a spooled file from an SQL + database query. I found that by setting the Column command for that field at a much lower number, I SQL+ would wrap the text for me in the .txt file. That output now imports into Excel correctly. If you find a straightforward way to solve the problem I would be interested in hearing about it, but otherwise, you can drop this ticket. Thanks.


----------

