Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a load of data in a csv file that I'm importing into Excel, most of it is fine, but one of my columns contains up to 1000 characters of data. Unfortunately, Excel has taken it upon itself to assume that's more data than I need and seems to be cutting it short (at 255 chars).

How can I increase this limit and retain all my data?

share|improve this question

migrated from Jan 28 '13 at 15:22

This question came from our site for professional and enthusiast programmers.

What do you mean by "Unfortunately, Excel has taken it upon itself to assume that's more data than I need and seems to be cutting it short." is it not displayed properly? what happens if you put =LEN(A1) into Excel where A! is the reference to your text? – Peter Albert Jan 28 '13 at 13:15
It says 255, and when i look at the data In the formula entry box it just suddenly stops. I can display the full data in open office, but as soon as I paste to excel it seems to be limiting to 255 chars. The reason I am not using open office is because I can past as data or do a vlookup in that. – WebweaverD Jan 28 '13 at 13:36
Excel can handle texts longer than 255 chars. However, if the cell is filled by VBA, it is a bit complicated. What's your source? How do you get it into Excel? – Peter Albert Jan 28 '13 at 13:47
I have a csv export from magento. If I open in OO it has the full text. If I open in Excel its cut short. Also gets cut short when I paste from OO to excel and I cannot manually type any more in the cell, it just gets cut off at the same point as soon as I leave the cell. – WebweaverD Jan 28 '13 at 14:12
Maybe something is off with the CSV? Can you update your question and post some lines? Also, maybe the delimiter and separator settings on your machine start acting up? – Jan Doggen Jan 28 '13 at 16:07

There is a weird bug in Excel. I'll explain here how to avoid (not fix, just avoid) it, and maybe it will fixed soon by MS Office programmers. Maybe it even WAS fixed in Excel 2013, I did not open it yet.

So, this is the problem.

The maximum length of the text cell is 32767, and it's OK.

The maximum length of the number cell is 255, and it's OK.

But if you have a cell that calls to number parser, fails and then calls to text parser, here will be the big mess.

For example:

...,"This is a cell with 30,000 characters........",...

will work.

But if you'll put a little minus at the start, as in

...,"-This is a cell with 30,000 characters........",...

you'll see only 255 first text characters, because EXCEL thinks it's a negative number.

Hope it helps.

share|improve this answer
This is the weirdest and most stupid bug I've ever seen in commercial software. It's literally driving me insane how on Earth can you pay for this kind of sh*t. – astrojuanlu Oct 22 '14 at 11:49
up vote 1 down vote accepted

Firstly, Thank you all for your help in trying to solve this. It turns out excel can quite happily accommodate more than 255 chars to a cell (presumable up to 32,767 as previously mentioned if you've got the ram for it.

So why didn't is work?

The short answer is I'm not sure. The first time I brought the data into excel I exported as a csv then opened in excel. This cut the columns short (at 255). (the csv file contained all the data when viewed through notepad but not when saved again through excel).

The column in question did contain some semicolons, but this didnt correspond to the cut off point (always 255) and I wasnt using ; as a delimiter.

My solution wast to do an export as an xls file. This has since been saved successfully as a csv file with the full data.

Hope this helps someone even though I'm still not sure exactly what the issue was here.

share|improve this answer
Simple Googling results in a lot of forum post of people who have the same problem; it's probably just a bug in the Excel CSV import routine. – Marcus Chan Jan 28 '13 at 16:41

I ran into this problem with a csv file that had some long text fields that sometimes began with a dash. It seems that Excel's import tries to process the field as a number because of the dash, and the number import trims it to 255 characters. When that fails, it imports it as text, but only the first 255 characters.

To avoid the problem, I had to import the csv instead of just opening it. In the import wizard, I selected the column that was having trouble and switched its type from General to Text. Then Excel won't even try to parse it as a number, and I get the full column width.

share|improve this answer

Generally, this is an old limitation that no longer applies to modern versions of Excel (2013 anyway). However, if a workbook was originally created in an older version, cell objects that were modified (i.e. thereby instantiated with particular properties and attributes) in the older version will, apparently, retain the 255 character limitation even when opened in newer versions of Excel!

A fix:

  1. Using a modern version of Excel, in a different, unused cell on the worksheet, recreate whatever formatting and/or merged-range condition is required for the problem cell.
  2. Be sure that it is set to General or Text format.
  3. Cut or copy and paste the new, recreated version of cell (or merged range) and paste it over the old, bad version.
  4. Now, when entering data into the cell, the problem should no longer manifest.

As WebweaverD subsequently posted, he found a solution to his csv import problem. Also, if the cells are being populate via VBA, then the situation gets more complex, as mention by other replies. But if the data is being manually entered, or copied/pasted from another application into a legacy workbook, the problem may be caused by this legacy cell-attribute issue.

share|improve this answer

According to, Excel 2010 only supports a 255 character column width.

Edit: Is this the problem you're talking about, Webweaver? Does Format > Cells > Wrap Text make the rest of the characters visible?

Edit: Never mind, this answer is somewhat unrelated to the problem at hand (possibly related somehow, but it doesn't answer the question)

share|improve this answer
No, that's the COLUMN WIDTH. From the same table, the "Total number of characters that a cell can contain" is 32,767 characters. – Vicky Jan 28 '13 at 15:35
@Vicky, isn't that the problem the asker is experiencing? Or did I misinterpret the question? – Marcus Chan Jan 28 '13 at 15:51
@nixda real? yes real annoying. I cant believe excel cannot handle more the 255 chars. There is a way to do this! – WebweaverD Jan 28 '13 at 16:01
@Marcus I dont understand what it means by column width. This isn't just a display issue the data isn't there. It gets cut short. when I save as a csv the data isn't there. when i do len(cell) the result is 255. – WebweaverD Jan 28 '13 at 16:04
@MarcusChan, the number of characters should be limited to 32767. The user is experiencing it being limited to 255. What you were referring to was the column width which is to do with how the column is displayed, which is not the OP's problem. – Vicky Jan 28 '13 at 16:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .